AGENT SKILL

add-view

Add a new API view function or endpoint to a Django views.py file. Use when adding views, endpoints, or API routes.

License 许可
MIT
所属仓库
Tetra-Research/jig
最近更新
2026-04-10
Stars
★ 6
Forks
0

01 前言 Front Matter

name
add-view
description
Add a new API view function or endpoint to a Django views.py file. Use when adding views, endpoints, or API routes.

02 资源文件 2

03 SKILL.md 正文

Add View

Add a new API view function to views.py using jig.

Usage

Run the jig recipe with view_name and model_name:

jig run ${CLAUDE_SKILL_DIR}/recipe.yaml --vars '{"view_name": "<name>", "model_name": "<Model>"}'

If invoked as /add-view <view_name> <model_name>:

jig run ${CLAUDE_SKILL_DIR}/recipe.yaml --vars '{"view_name": "$1", "model_name": "$2"}'

Variables

  • view_name: The function name (e.g. reservation_receipt)
  • model_name: The Django model to query (e.g. Reservation)

Extract these from the user's request. For "add a receipt view for Reservation", that's view_name: reservation_receipt, model_name: Reservation.

Gotchas

  • If jig exits non-zero, it prints the rendered template to stderr. Use that output to apply changes manually.
  • Run jig vars ${CLAUDE_SKILL_DIR}/recipe.yaml to confirm required variables if unsure.

04 同仓库更多 Skills