agent-coding-reasoning/SKILL.md
A comprehensive skill for maximizing performance on agentic tool-use and competitive coding tasks. Use this skill whenever the user asks the agent to write, debug, or optimize code; solve algorithmic or competitive programming problems; call tools or APIs as part of a multi-step workflow; build or orchestrate agents; reason about function signatures, schemas, or tool parameters; handle multi-turn task execution where state must be tracked; or debug code from execution feedback. This skill is especially important for function/tool calling tasks, multi-step agentic pipelines, algorithm design, competitive programming, code self-repair, and any task where correctness under edge cases matters. When in doubt about whether to use this skill, use it — it substantially improves output quality across all coding and agentic tasks.
npx skillsauth add ahoynodnarb/reasoning-based-skills agent-coding-reasoningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill encodes best practices for two interrelated capability families:
Both families share a common foundation: structured thinking, precise output formatting, and disciplined verification before responding.
Tool use is a formal act. A function call is a contract: wrong argument types, missing parameters, or incorrect names cause silent failures or downstream errors. Treat every tool call with the same rigor as writing production code.
Phase 1: Schema Analysis Before calling any tool, fully parse its schema:
Phase 2: Intent–Schema Alignment Map the user's request onto the schema precisely:
Phase 3: Call Formation Construct the call:
Phase 4: Post-Call Reasoning After a tool returns:
In multi-turn agentic tasks, state accumulates. Managing it well is the single biggest differentiator between agents that complete tasks and agents that loop or fail.
State Tracking Rules:
Decision-Making Under Uncertainty:
Stopping Criteria:
Not every user request should result in a tool call. A sophisticated agent knows when not to act.
Ask yourself:
When no tool is appropriate, say so clearly and provide direct assistance instead.
When multiple tools can be called independently (results don't depend on each other):
When multiple functions must be called on a single user intent:
Correct code is not "code that works on the examples." Correct code is code that works on all valid inputs, including the ones designed to break naive solutions. Think adversarially about your own solutions.
Step 1: Understand the problem fully before writing any code
Step 2: Choose the right algorithm class Match the problem structure to the right tool:
Step 3: Analyze complexity before coding
Step 4: Code methodically
a, b, c but left, right, midBefore finalizing any solution, check all of these:
Input boundaries:
Structural edge cases:
Numeric edge cases:
Off-by-one errors:
< n or <= n?(a % m + m) % m needed?When given a failing solution and error feedback, use this protocol:
Step 1: Read the error precisely
Step 2: Categorize the failure
Step 3: Form a hypothesis Name the specific bug before touching the code: "I believe the failure is caused by [X] because [Y]."
Step 4: Fix surgically
Step 5: Strengthen the solution After the fix, revisit the edge case checklist. The failing case is often a hint that a class of similar cases is also broken.
When asked to predict or trace program execution:
These apply to both agentic tasks and coding tasks:
For any non-trivial task, think before you write. Use this structure:
UNDERSTAND: What is actually being asked?
CONSTRAINTS: What are the boundaries/requirements?
APPROACH: What strategy will I use and why?
RISKS: Where could this go wrong?
OUTPUT: Produce the solution, then verify it.
Don't skip the verification step. Re-read your output against the original requirements before finalizing.
When the task is ambiguous:
When information is spread across a long context:
"3" when 3 is neededdevelopment
Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review writing use peer-review.
testing
Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.
testing
Apply this skill whenever the user writes in a non-English language, asks questions about regional/cultural knowledge tied to a specific country or language community, poses math or logic problems in any language, or needs to follow multi-step instructions given in a non-English language. Also use when the user explicitly asks the agent to respond in a specific language, when a task requires cross-lingual reasoning or comparison, or when the user is testing the agent's multilingual ability. This skill dramatically improves performance on multilingual instruction-following, regional knowledge, mathematical reasoning, and logic tasks in any language. Use it proactively — don't wait for the user to ask about "multilingual" explicitly.
development
Activate this skill for any problem requiring rigorous mathematical reasoning, formal logical deduction, or structured constraint solving. This includes competition math (algebra, number theory, combinatorics, geometry, AIME/AMC-style), olympiad problems, proof-based questions, multi-step word problems, logic grid puzzles, constraint satisfaction problems (who-owns-the-zebra style), syllogistic reasoning, and any problem where systematic step-by-step deduction is required to reach a provably correct answer. Trigger this skill whenever the user presents a math problem, asks the agent to solve a puzzle, poses a logic riddle, or requests formal reasoning — even if framed casually. When in doubt, use this skill. Precision and correctness matter more than speed.