coding
Universal coding rules for any project type — error handling, testing, API design, dependency hygiene, config/secrets, logging. Extends `coding-agent-guardrails`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Universal coding rules for any project type — error handling, testing, API design, dependency hygiene, config/secrets, logging. Extends `coding-agent-guardrails`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Android/Kotlin/Compose coding rules — modular architecture, ViewModel scope, Material 3, Compose pitfalls, strings, navigation, network safety, and build hygiene. Extends `coding` + `coding-agent-guardrails`.
Universal code quality guardrails — file size limits, code structure, VCS discipline, and build behavior for any project
Structured technical feature plan with bullet-point format, file/line references, phased implementation checklists, and per-phase test verification
Product requirements document for larger features — user-facing behavior, options, decisions, screen layouts, and open questions. Precedes the technical plan.
One-shot investigation → findings document. No state, no checklist, no phases — investigate, write the answer, stop.
Orchestrates the full agentic SDLC — PRD → Plan → Review → Implement → Verify → Review — with pluggable reviewer model, feature/sub-feature decomposition, and resumable state.
| name | coding |
| description | Universal coding rules for any project type — error handling, testing, API design, dependency hygiene, config/secrets, logging. Extends `coding-agent-guardrails`. |
| version | 0.1.0 |
| triggers | ["coding rules","/coding"] |
| globs | ["**/*"] |
Universal rules for any project type — backend, CLI, web, bash. Apply these on every file you touch.
coding-agent-guardrails (base — structure + VCS + build discipline)
│
├── coding (this skill — universal runtime rules)
│ ├── error handling
│ ├── testing discipline
│ ├── API design
│ ├── dependency hygiene
│ ├── config/secrets
│ └── logging
│
└── android-coding (extends coding + coding-agent-guardrails)
├── Kotlin/Compose specifics
└── Android-only rules
coding-agent-guardrails skill before applying anything here — it governs every file you touch (file size, code organization, VCS discipline, build behavior) and is always in force.android-coding, future web-coding, cli-coding) specifies a tighter rule, that skill wins for its file types.Result<T>, Either<Error, T>, or a language-idiomatic equivalent) — never throw from a public API# ❌ WRONG — exception escapes boundary
def get_user(id):
return db.query(User, id) # throws if not found
# ✅ CORRECT — typed result at boundary
def get_user(id) -> Result[User, NotFoundError]:
try:
return Ok(db.query(User, id))
except DoesNotExist:
return Err(NotFoundError(f"User {id} not found"))
# ❌ WRONG — no test for the edge case
def divide(a, b):
return a / b
# ✅ CORRECT — edge case covered
def test_divide_by_zero():
with pytest.raises(ZeroDivisionError):
divide(1, 0)
/api/v1/...) before a breaking change, not after// ❌ WRONG
{ "error": "something went wrong" }
// ✅ CORRECT
{ "error": { "code": "USER_NOT_FOUND", "message": "User 42 not found" } }
# ❌ WRONG — version bump bundled into feature work
- requests==2.28.0
+ requests==2.31.0 # "while I'm here, might as well update"
# ✅ CORRECT — dedicated dependency update
# PR title: "chore(deps): bump requests 2.28.0 → 2.31.0"
# Single-purpose, reviewable, revertable
# ❌ WRONG — hardcoded secret
API_KEY = "sk-live-abc123"
# ✅ CORRECT — from environment
API_KEY = os.environ["API_KEY"]
debug for tracing, warn for recoverable issues, error for failures needing attention# ❌ WRONG — PII in logs, wrong level
logger.error(f"User {user.email} logged in")
# ✅ CORRECT
logger.info("user_login", extra={"user_id": user.id})