aposd-verifying-correctness
Verify code correctness before claiming done or committing. Run 6-dimension checklist: requirements coverage, concurrency safety, error handling, resource management, boundary conditions, and security. Output PASS/FAIL per dimension with final DONE/NOT DONE verdict. Use after implementation as pre-commit gate. Triggers on: is it done, ready to commit, verify correctness, did I miss anything, pre-commit check.
Best use case
aposd-verifying-correctness is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Verify code correctness before claiming done or committing. Run 6-dimension checklist: requirements coverage, concurrency safety, error handling, resource management, boundary conditions, and security. Output PASS/FAIL per dimension with final DONE/NOT DONE verdict. Use after implementation as pre-commit gate. Triggers on: is it done, ready to commit, verify correctness, did I miss anything, pre-commit check.
Teams using aposd-verifying-correctness should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/aposd-verifying-correctness/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How aposd-verifying-correctness Compares
| Feature / Agent | aposd-verifying-correctness | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Verify code correctness before claiming done or committing. Run 6-dimension checklist: requirements coverage, concurrency safety, error handling, resource management, boundary conditions, and security. Output PASS/FAIL per dimension with final DONE/NOT DONE verdict. Use after implementation as pre-commit gate. Triggers on: is it done, ready to commit, verify correctness, did I miss anything, pre-commit check.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Skill: aposd-verifying-correctness ## STOP - Before "Done" **Design quality ≠ correctness.** Well-designed code can still have bugs, missing requirements, or safety issues. **Run ALL dimension checks before claiming done.** "I think I covered everything" without explicit mapping is a red flag. --- ## Dimension Detection & Checks For each dimension: detect if it applies, then verify. --- ### 1. Requirements Coverage **Detect:** Were requirements stated? (explicit list, user request, spec) **If YES, verify:** - [ ] List each requirement explicitly - [ ] For each: point to code that implements it - [ ] Any requirement without code? → **Not done** - [ ] Any code without requirement? → Scope creep or missing requirement **Red flag:** "I think I covered everything" without explicit mapping --- ### 2. Concurrency Safety **Detect:** Any of these present? - Multiple threads/processes accessing same data - Async/await patterns - Shared mutable state (class attributes, globals) - "Thread-safe" in requirements or docstring - Web handlers, queue workers, background tasks **If YES, verify:** - [ ] All shared mutable state identified - [ ] Each access point protected (lock, atomic, queue, immutable) - [ ] No time-of-check to time-of-use (TOCTOU) gaps - [ ] Lock ordering consistent (if multiple locks) **Red flag:** "It's probably fine" or "Python GIL handles it" --- ### 3. Error Handling **Detect:** Can any operation fail? - I/O (file, network, database) - External calls (APIs, subprocesses) - Resource acquisition (memory, connections) - User input processing - Parsing/deserialization **If YES, verify:** - [ ] Each failure point has explicit handling OR propagates - [ ] No bare `except:` or `except Exception: pass` - [ ] Error messages actionable (what failed, why, how to fix) - [ ] Partial failures handled (rollback, cleanup, consistent state) **Red flag:** "Errors are rare" or "caller handles it" without checking caller --- ### 4. Resource Management **Detect:** Does code acquire resources? - File handles, sockets, connections - Locks, semaphores - Memory allocations (large buffers, caches) - External service handles - Background threads/processes **If YES, verify:** - [ ] Every acquire has corresponding release - [ ] Release happens in finally/context manager/destructor - [ ] Release happens on error paths too - [ ] No resource leaks on repeated calls - [ ] Bounded growth (caches have limits, queues have limits) **Red flag:** "It cleans up eventually" or daemon threads without shutdown --- ### 5. Boundary Conditions **Detect:** Does code handle variable-size input? - Collections (lists, dicts, sets) - Strings, byte arrays - Numeric ranges - Optional/nullable values **If YES, verify:** - [ ] Empty input: What happens with `[]`, `""`, `None`, `0`? - [ ] Single item: Edge case often different from N items - [ ] Maximum size: What if input is huge? Memory? Time? - [ ] Invalid values: Negative numbers, NaN, special characters? - [ ] Type boundaries: int overflow, float precision? **Red flag:** "Nobody would pass that" or "that's an edge case" --- ### 6. Security (if applicable) **Detect:** Does code handle untrusted input? - User-provided data (forms, API requests) - File contents from external sources - URLs, paths, identifiers from users - Data that becomes SQL, shell, HTML, or code **If YES, verify:** - [ ] Input validated before use - [ ] No string concatenation for SQL/shell/HTML (use parameterized) - [ ] Path traversal prevented (no `../` exploitation) - [ ] Secrets not logged or exposed in errors - [ ] Auth/authz checked before action, not after **Red flag:** "It's internal only" (internals get exposed) --- ## Quick Checklist (Minimum) Before "done", answer YES to all that apply: | Dimension | Detection Trigger | Verified? | |-----------|-------------------|-----------| | Requirements | Requirements were stated | [ ] Each mapped to code | | Concurrency | Shared state exists | [ ] All access protected | | Errors | Operations can fail | [ ] All failures handled | | Resources | Resources acquired | [ ] All released (incl. errors) | | Boundaries | Variable-size input | [ ] Edge cases handled | | Security | Untrusted input | [ ] Input validated | --- ## Anti-Rationalization Table | Thought | Reality | |---------|---------| | "Design is good, so it works" | Design ≠ correctness. Check anyway. | | "It's simple code" | Simple code has bugs too. Check anyway. | | "I'll add error handling later" | Later = never. Check now. | | "Edge cases are rare" | Edge cases cause production incidents. | | "It's not user-facing" | Internal code gets exposed. Check anyway. | | "Tests will catch it" | Tests check what you wrote, not what you missed. | --- ## Output Format When verifying, output: ``` ## Correctness Verification ### Requirements: [PASS/FAIL/N/A] - Requirement 1 → implemented in X - Requirement 2 → implemented in Y ### Concurrency: [PASS/FAIL/N/A] - Shared state: [list] - Protection: [how] ### Errors: [PASS/FAIL/N/A] - Failure points: [list] - Handling: [approach] ### Resources: [PASS/FAIL/N/A] - Acquired: [list] - Released: [how] ### Boundaries: [PASS/FAIL/N/A] - Edge cases: [list] - Handling: [approach] ### Security: [PASS/FAIL/N/A] - Untrusted input: [list] - Validation: [approach] **Verdict:** [DONE / NOT DONE - list blockers] ``` --- ## Relationship to Other Skills | Skill | Focus | When | |-------|-------|------| | **aposd-designing-deep-modules** | Design quality | FIRST—during design | | **aposd-maintaining-design-quality** | Design philosophy | During modification | | **aposd-verifying-correctness** | Actual correctness | BEFORE "done" | | **cc-quality-practices** | Testing/debugging | Throughout | **Order:** Design → Implement → Verify (this skill) → Done --- ## Chain | After | Next | |-------|------| | All dimensions pass | Done (pre-commit gate) |
Related Skills
aposd-simplifying-complexity
Simplify complex code through the Error Reduction Hierarchy: Define out > Mask > Aggregate > Crash. Use when code is too complex, has scattered error handling, configuration explosion, or callers doing module work. Produce technique analysis table with gate checks before simplified code. Triggers on: too complex, simplify, scattered errors, configuration proliferation, verbose error handling. Complements cc-defensive-programming with design-level error elimination.
aposd-reviewing-module-design
Evaluate module design using APOSD principles with 40-item checklist. Detect complexity symptoms (change amplification, cognitive load, unknown unknowns), shallow modules, information leakage, pass-through methods, and structural anti-patterns. Produce categorized design review (Critical/Moderate/Observations/Positive). Use when reviewing code, assessing interfaces, during PR review, or evaluating 'is this too complex?' Triggers on: code review, design review, module complexity, interface assessment, PR review, structural analysis.
aposd-optimizing-critical-paths
Optimize performance through mandatory measure-first workflow with 3 stages: MEASURE (gate) -> FUNDAMENTAL FIX -> CRITICAL PATH REDESIGN. Use when code is too slow, laggy, hangs, doesn't scale, has timeouts, OOM errors, or high CPU/memory. Emphasize that simpler code usually runs faster. Triggers on: performance issues, optimization needed, takes forever, profiling. Produces profiling-backed optimization with verified improvement.
aposd-maintaining-design-quality
Enforce strategic programming discipline when modifying existing code. Guide through STOP-ASK-DECIDE-VERIFY workflow with urgency tier assessment (trivial/minor/standard/emergency). Include when NOT to refactor (Chesterton's Fence, performance-critical, no tests) and block tactical shortcuts via anti-rationalization tables. Use when fixing bugs, extending features, or tempted to make quick fixes. Triggers on: modify code, fix bug, extend feature, quick fix, tactical change.
aposd-improving-code-clarity
Enforce comments-first workflow for new code and improve naming/documentation for existing code. Use when writing new classes, methods, or functions; when code is 'confusing' or 'hard to understand'; when naming precision is poor; or when variable documentation lacks units, bounds, or ownership. Triggers on: new code, comments-first, naming review, documentation review, not obvious, hard to understand. Produces well-documented code with precise naming, or identifies design problems when comments/names are hard to write.
aposd-designing-deep-modules
Enforce Design-It-Twice workflow: generate 2-3 radically different approaches, compare them, then implement. Use when designing modules, APIs, or classes before implementation. Triggers on: design, create class, add module, implement feature, new service, API design, before implementing. Produces structured design document with approaches, comparison table, choice rationale, and depth check.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
aqwa-analysis
Integrate with AQWA hydrodynamic software for RAO computation, damping analysis, and coefficient extraction. Use for AQWA file processing, RAO calculation, hydrodynamic coefficient extraction, and pre/post processing workflows.
aptos-expert
Expert on Aptos blockchain, Move language, smart contracts, NFTs, DeFi, and Aptos development. Triggers on keywords aptos, move, blockchain, smart contract, nft, defi, web3, mainnet, testnet, devnet
appwrite-python
Appwrite Python SDK skill. Use when building server-side Python applications with Appwrite, including Django, Flask, and FastAPI integrations. Covers user management, database/table CRUD, file storage, and functions via API keys.
appveyor-automation
Automate Appveyor tasks via Rube MCP (Composio). Always search tools first for current schemas.
appsflyer-automation
Automate Appsflyer tasks via Rube MCP (Composio). Always search tools first for current schemas.