1---2name: algorithm-trace-checker3description: algorithm-trace-checker4---5# algorithm-trace-checker67## Purpose8Trace an algorithm step by step against representative inputs to verify state transitions, outputs, and hidden assumptions.910## Trigger this skill when11- You need a structure or algorithm recommendation grounded in the real workload.12- A current implementation choice feels arbitrary, costly, or hard to justify.13- You want to reason about correctness or performance before writing more code.1415## Expected inputs16- algorithm description or code17- representative inputs18- expected behavior19- state variables20- edge cases2122## Deliverables23- step trace24- state evolution notes25- divergence points26- assumption notes27- recommended fixes or next checks2829## Operating procedure301. Identify the data or algorithmic concern this skill is meant to assess.312. Separate facts about operations, sizes, ordering, and mutation from assumptions.323. Review the current or proposed approach against the workload, invariants, complexity, and representation constraints.334. Surface concrete risks, tradeoffs, and improvement options.345. Prefer the least complex structure or algorithm that meets the stated needs.356. Hand off to the next most relevant skill if the issue is broader than this skill alone can resolve.3637## Quality gates38- Findings are tied to the stated workload or concrete algorithm steps.39- Recommendations explain why the choice fits the context.40- Tradeoffs are stated when multiple options are viable.41- Output distinguishes asymptotic concerns from practical implementation risks.4243## Handoff targets44- invariant-finder45- complexity-red-flag-detector46- recursion-iteration-transformer4748## Output style49- Be explicit about uncertainty.50- Prefer short, evidence-based findings over generic claims of efficiency.51- Call out hidden assumptions such as sorted input, bounded size, or low mutation.52- End with recommended next actions.5354## Failure modes to avoid55- Do not recommend advanced structures without a workload that justifies them.56- Do not rely on Big-O alone when locality or constant factors dominate.57- Do not conflate proof of correctness with a single successful example.58- Do not ignore edge cases, degenerate inputs, or mutation semantics.5960## Minimum output skeleton61```md62## Summary63## Findings64## Risks65## Recommendations66## Tradeoffs67## Recommended next skill68```
Run npx skillmds@latest add 45ck/algorithm-trace-checker in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
algorithm-trace-checker It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
45ck (@45ck) published this skill. Their other Agent Skills are listed on their SkillMD profile.