book--code-complete--nano
Code Complete (Steve McConnell) — Minimal rules — essential one-liners only. Use when asked to apply Code Complete principles or review code against Code Complete standards.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 13
- Forks
- 2
01 前言 Front Matter
- name
- book--code-complete--nano
- origin
- github.com/ciembor/agent-rules-books (MIT)
- license
- MIT
- version
- 1.0.0
- description
- Code Complete (Steve McConnell) — Minimal rules — essential one-liners only. Use when asked to apply Code Complete principles or review code against Code Complete standards.
- compatibility
- yana-ai >= 0.14.0
03 SKILL.md 正文
OBEY Code Complete by Steve McConnell
When to use
Use as a compact always-on construction discipline for implementation, review, debugging, refactoring, and tuning.
Primary bias to correct
Working code is not enough. Construction must lower defect risk, control complexity, and make human inspection cheap.
Decision rules
- Clarify requirements, architecture fit, risks, conventions, and major construction decisions before coding from a solution idea.
- Choose clarity, locality, explicitness, simple control flow, and consistent style over clever compactness or fashionable idioms.
- Keep routines, classes, and modules cohesive, precisely named, small at the interface, encapsulated, and hard to misuse.
- Make data meaning visible with names, constants, stronger types, closed states, deliberate initialization, units, and ownership.
- Validate trust boundaries; use assertions, invariants, and contracts for programmer assumptions; keep error handling explicit and diagnosable.
- Keep branches, loops, exits, exceptions, and table-driven logic simple enough to verify.
- Build, test, review, debug, refactor, integrate, and tune in small evidence-based loops: root cause before fixes, behavior protection before refactoring, measurement before optimization.
- Use comments, documentation, tools, and standards to reduce reader or manual effort, never to hide poor structure.
Trigger rules
- When a solution appears before the problem is clear, restate the requirement, constraints, and construction risks.
- When readers must decode names, flags, primitives, units, states, or layout, model the meaning explicitly.
- When a routine mixes phases or has a hard-to-use interface, split concerns or change the data model.
- When input crosses a trust boundary, decide validation, rejection, recovery, assertion, and diagnostics.
- When control flow, loops, exceptions, or branching tables are hard to inspect, simplify before adding logic.
- When tests only prove happy paths, add boundary, invalid-input, defensive-check, contract, and data-driven cases.
- When debugging, refactoring, or performance work starts from a guess, get evidence first.
- When comments repeat obvious mechanics, rewrite the code or delete the comment; keep comments for intent and constraints.
Final checklist
- Clear construction context?
- Inspectable code shape?
- Explicit data meaning?
- Defended boundaries and diagnosable failures?
- Simple flow?
- Defect-finding tests and reviews?
- Evidence before fixes, refactors, and tuning?
04 同仓库更多 Skills
openai--sentry--sentry
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.
ito-basket-compare
Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.
implementing-network-traffic-baselining
Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern profiling
detecting-evasion-techniques-in-endpoint-logs
Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.
implementing-microsegmentation-with-guardicore
Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.
ramdisk-tmpfs-patterns
暂无简介