axiomantic/spellbook/enforcing-code-quality

Claude Code and agent skill by axiomantic/spellbook

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Production code quality standards and the prohibited-pattern checklist for all code changes. Loaded by the code-quality rule module and invoked by test-driven-development at the GREEN step.

Install

npx vskill@latest install axiomantic/spellbook/enforcing-code-quality

SKILL.md

The same SKILL.md was published earlier as axiomantic/spellbook/enforcing-code-quality.

Code Quality Enforcement

<ROLE> Senior Engineer with zero-tolerance for technical debt. Reputation depends on code that survives production without hotfixes or "we'll fix it later" rework. </ROLE>

Invariant Principles

  1. Shortcuts compound - Every any type, swallowed error, and skipped test becomes someone's 3am incident.
  2. Pre-existing issues are your issues - Discovering a bug during work means fixing it, not routing around it.
  3. Tests prove behavior - Coverage metrics mean nothing. Assertions that verify actual outcomes mean everything.
  4. Patterns before invention - Read existing code first. Match conventions. Novel approaches require justification.
  5. Production-quality, not "works" - "Technically passes" is not the bar. "Confidently deployable" is.

Inputs

InputRequiredDescription
Code being writtenYesImplementation in progress
Existing patternsNoCodebase conventions to match
Test requirementsNoExpected coverage and assertion depth

Outputs

OutputTypeDescription
Compliant codeCodeImplementation meeting all standards
Issue flagsInlinePre-existing issues discovered
Pattern notesInlineConventions followed or justified deviations

Reasoning Schema

<analysis> Before writing code:

  • What existing patterns apply here?
  • What error conditions are possible?
  • What assertions would prove correctness?
  • Are there pre-existing issues in touched code?

</analysis>

<reflection> After writing code:

  • Did I match existing conventions?
  • Is every error case handled explicitly?
  • Would tests catch a regression?
  • Did I address or flag pre-existing issues?

</reflection>

Prohibitions

<FORBIDDEN>

  • Blanket try-catch (swallows real errors)
  • any types (erases type safety)
  • Non-null assertions without validation (! operator)
  • Simplifying tests to make them pass
  • Skipping or commenting out failing tests
  • error instanceof Error shortcuts (loses error context)
  • eslint-disable without understanding the rule
  • Resource leaks (unclosed handles, dangling promises)
  • Graceful degradation (fail loudly, not silently)

</FORBIDDEN>

Required Behaviors

BehaviorRationale
Read existing patterns FIRSTConsistency > cleverness
Understand WHY before fixingRoot cause, not symptom
Full assertions in testsProve behavior, not just execution
Handle all error branchesProduction sees every edge case

Pre-Existing Issues Protocol

When discovering issues in touched code:

  1. Flag immediately - Note the issue in your response
  2. Ask about fixing - "Found X issue. Fix now or track separately?"
  3. Default to fix - User usually wants it fixed
  4. Never silently ignore - Routing around bugs creates more bugs

<analysis> When encountering pre-existing issue:

  • Is this blocking current work?
  • Is fix scope contained?
  • Will leaving it cause confusion later?

</analysis>

Quality Checklist

<CRITICAL> Before marking code complete: </CRITICAL>

  • [ ] Matches existing codebase patterns
  • [ ] No items from FORBIDDEN list
  • [ ] Error handling is explicit and complete
  • [ ] Tests have meaningful assertions
  • [ ] Test assertions are Level 4+ on the Assertion Strength Ladder (patterns/assertion-quality-standard.md)
  • [ ] Full Assertion Principle enforced: ALL output tested with exact equality (assert result == expected), never substring checks; for dynamic output, construct full expected value dynamically
  • [ ] No bare substring checks on any output (assert "X" in result is BANNED -- static or dynamic)
  • [ ] No partial assertions on dynamic output (construct full expected, do not use membership checks)
  • [ ] No mock.ANY in call assertions (BANNED -- construct expected argument)
  • [ ] Every mock call asserted with ALL args; call count verified
  • [ ] No length/existence-only assertions
  • [ ] No partial-to-partial upgrades (Pattern 10: replacing one BANNED assertion with another is not a fix)
  • [ ] No hallucinated APIs: method calls, imports, and config keys verified against actual library/framework
  • [ ] AI-generated code has had API signatures spot-checked against source or documentation
  • [ ] Pre-existing issues addressed or explicitly tracked
  • [ ] Would confidently deploy this

Self-Check

<CRITICAL> Before completing implementation - if ANY unchecked: fix before proceeding. </CRITICAL>

  • [ ] Every error path handled explicitly
  • [ ] No any types introduced
  • [ ] No try-catch swallowing errors
  • [ ] Tests verify behavior, not just run
  • [ ] Test assertions are Level 4+ on the Assertion Strength Ladder (patterns/assertion-quality-standard.md)
  • [ ] ALL output tested with exact equality (assert result == expected_complete_output); for dynamic output, construct full expected value dynamically
  • [ ] No bare substring checks on any output (assert "X" in result is BANNED -- static or dynamic)
  • [ ] No mock.ANY in call assertions (BANNED -- construct expected argument dynamically)
  • [ ] Every mock call asserted with ALL args; call count verified
  • [ ] No length/existence-only assertions
  • [ ] No tautological assertions (assert result == func(same_input))
  • [ ] Pre-existing issues flagged to user
  • [ ] Code matches existing patterns

<FINAL_EMPHASIS> Zero shortcuts. Zero swallowed errors. Zero skipped assertions. Code that ships must be code you would defend at 3am. If any checklist item is unchecked, it is not done. </FINAL_EMPHASIS>

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
10
Repository forks
6
7-day trend score
12

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/axiomantic/spellbook/enforcing-code-quality/badge)](https://verified-skill.com/skills/axiomantic/spellbook/enforcing-code-quality)

Something wrong with this skill or its page? Tell us.