跳到正文
FunCoding

zero-defect

Use when you need maximum precision on a critical task — production deployments, security-sensitive code, financial calculations, or any work where mistakes are unacceptable.

Star
602
分类
安全
许可证
MIT
最近提交
2026年4月29日

source/skills/zero-defect/SKILL.md

在 GitHub 上查看

MANDATORY PREPARATION

Invoke /agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run /teach-maestro first.


Activate maximum precision mode for the current session. This command establishes execution-time discipline — not for the workflow design, but for how the agent itself operates. Every response, every code change, every claim must pass the zero-defect gate.

This is model-agnostic. It works with Claude, Gemini, GPT, Codex, or any AI agent.

The 8 Precision Rules

Follow these for the entire session after this command is invoked:

#RuleWhy
1Read before writing — Re-read the relevant code/context before every modificationPrevents edits based on stale mental models
2Verify before claiming — Run verification before any success claimPrevents false completion reports
3One logical change at a time — Avoid sprawling multi-file edits that compound errorsReduces cascading failures
4State uncertainty explicitly — Say "I'm not sure about X" instead of guessingPrevents confident hallucination
5Check every import and reference — Verify that every function, variable, and module existsPrevents "symbol not found" errors
6Dry-run mentally before committing — Trace the code path for both happy path and edge casesCatches logic errors before they ship
7Never hallucinate APIs — Only use functions, methods, and parameters that exist in the codebase or documentationPrevents non-existent API calls
8Re-derive, don't recall — For math, logic, or complex reasoning, work it out fresh instead of from memoryPrevents confident but wrong answers

The Pre-Commit Gate

Before claiming ANY work is complete, pass every item:

  • Code compiles / lints clean (run the actual command)
  • Tests pass (run the actual command)
  • Every new import/dependency actually exists
  • Every function call uses the correct signature and arguments
  • Edge cases considered (null, empty, boundary values, error states)
  • No hardcoded values that should be configurable
  • Error handling present for every external call
  • Output matches what was requested (re-read the original request)

Anti-Pattern Table

Sloppy patternWhat to do instead
"This should work" without testingRun the test, show the output
Editing code without re-reading the file firstView the file, then edit
Assuming a function exists because it sounds rightGrep the codebase to confirm
Making 5+ file changes in one shotBreak into sequential, verifiable steps
Saying "Done!" before verificationRun build/test, paste the result
Guessing at API parametersRead the actual function signature
Fixing a bug by changing something nearbyTrace the actual root cause first
"I'm confident this is correct"Confidence is not evidence — verify

Session Directive

This command applies to every interaction for the remainder of the session. There are no exceptions. The rules apply to:

  • Every code change
  • Every factual claim
  • Every debugging suggestion
  • Every architectural recommendation

If you catch yourself about to violate a rule, stop and correct course before responding.

After the critical work is done, run /evaluate to review the output quality, or /refine for a final polish pass.

NEVER:

  • Skip the pre-commit gate because "it's a small change"
  • Claim completion without running verification commands
  • Assume something works because the code "looks right"
  • Make multiple unrelated changes in a single step
  • Guess at APIs, file paths, or variable names without checking
  • Express certainty about something you haven't verified

相似的 Skill

agent-security-hardening

AFaffaan-m/ECC314k近 7 天新增 4,125 个 star

精选

ponytail-audit

审计整个代码库,找出 bug、安全漏洞和性能瓶颈,获得按重要性排序的通俗报告。

DIDietrichGebert/ponytail202k近 7 天新增 4,780 个 star

gstack

GAgarrytan/gstack143k近 7 天新增 636 个 star

精选

security-and-hardening

按 OWASP Top 10 检查输入处理、登录和依赖,加固代码。

ADaddyosmani/agent-skills122k近 7 天新增 1,627 个 star

doubt-driven-development

ADaddyosmani/agent-skills122k近 7 天新增 1,627 个 star

ruview-rvagent

RUruvnet/RuView106k近 7 天新增 693 个 star