add-field
Add a new field to a Django model and propagate to admin, serializer, and factory. Use when adding model fields or database columns.
- License 许可
- MIT
- 最近更新
- 2026-04-10
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- add-field
- description
- Add a new field to a Django model and propagate to admin, serializer, and factory. Use when adding model fields or database columns.
02 资源文件 5
- 参考文档recipe.yaml1.2 KB
- 其他templates/admin_field.j227 B
- 其他templates/factory_field.j244 B
- 其他templates/model_field.j264 B
- 其他templates/serializer_field.j231 B
03 SKILL.md 正文
Add Field
Add a field to a Django model and propagate it to admin, serializer, and factory.
Inputs
Prefer structured arguments from $ARGUMENTS when available.
Accepted forms:
- JSON object with keys:
model_namefield_namefield_typefield_argsfactory_default
- Positional args:
<model_name> <field_name> <field_type> [field_args] [factory_default]
Normalization rules:
field_argsshould be raw Django field args without wrapping parentheses. Example:max_length=20, default="bronze"factory_defaultshould be a Python literal rendered into the factory line. For string defaults, include quotes in the value (example:"bronze").- If optional args are omitted, use:
field_args: ""factory_default: "'test'"
Usage
jig run ${CLAUDE_SKILL_DIR}/recipe.yaml --vars '{"model_name": "<Model>", "field_name": "<name>", "field_type": "<Type>", "field_args": "<args>", "factory_default": "<default>"}'
If invoked as /add-field <model_name> <field_name> <field_type>:
jig run ${CLAUDE_SKILL_DIR}/recipe.yaml --vars '{"model_name": "$1", "field_name": "$2", "field_type": "$3", "field_args": "", "factory_default": "\"test\""}'
Variables
- model_name: Model class name (e.g.
Reservation) - field_name: New field name (e.g.
loyalty_tier) - field_type: Django field type (e.g.
CharField) - field_args: Field arguments (e.g.
max_length=20, default="bronze") - factory_default: Factory default value (e.g.
"bronze")
Extract these from the user's request.
Gotchas
- If unsure about required variables, run:
jig vars ${CLAUDE_SKILL_DIR}/recipe.yaml
- If jig exits non-zero, it prints rendered output to stderr. Use that output for one manual correction pass.
04 同仓库更多 Skills
velocity
Systematic DX improvement hunt — find friction, inconsistency, and missing abstractions across PRs, code, or tickets, then feed findings into /improve. Use when looking for ways to accelerate development or compound Claude Code's utility.
upgrade
Upgrade an existing skill or agent by auditing it, gathering user references, and rewriting it with real content. Use when a skill is thin, sloppy, missing gotchas, or needs improvement. Different from /improve which creates new extensions.
improve
Deliberately improve Claude Code by creating or updating skills, agents, hooks, rules, or MCP servers. Use when Claude keeps making the same mistake, a workflow is tedious, a new pattern needs enforcement, or you want to compound Claude's utility.
clean-copy
Recreate the current branch with a clean, narrative commit history. Use before creating a PR from a messy development branch, after exploratory coding with WIP commits, or when commit history is hard to review.
audit
Audit installed skills and agents against best practices. Use when reviewing skill quality, checking for common problems, or before upgrading existing skills. Read-only — produces a report, changes nothing.
typescript-update-model
暂无简介