Docs From Code: Document Only What the Code Proves

    by apitoolbox

    1

    Draft reference docs from your code — every statement traceable to the code, and requested or expected details the code does not establish listed separately as NOT IN CODE.

    Free

    Security scanned

    Works with the AI Agents you already use

    Docs From Code: Document Only What the Code Proves

    Example session with this skill installed

    Document this function
    def calculate_fee(amount, user_type='standard'):
    if amount < 0: raise ValueError('Negative amount')

        if user_type == 'premium': return amount * 0.05
        return amount * 0.10
    
    • Read your context and instructions
    • Compiled the docs from code

    I have analyzed the provided code for calculate_fee. All details in the draft are verified by the implementation logic.

    Documentation Draft

    Signature
    def calculate_fee(amount, user_type='standard'):

    Parameters

    • amount: Numeric value used for fee calculation.
    • user_type: String (provable by comparison). Default is 'standard'.

    Returns

    • float: Returns amount * 0.05 if user_type is 'premium'.
    • float: Returns amount * 0.10 if user_type is not 'premium'.

    Raises

    • ValueError: Raised with message 'Negative amount' if amount < 0.

    Side Effects

    • None identified in the provided code.

    NOT IN CODE

    • Thread-safety guarantees: no basis in the provided code.
    • Performance limits for large amount values: no basis in the provided code.
    • Recommended user_type values beyond 'standard' and 'premium': no basis in the provided code.

    Verdict: PARTIAL

    Next steps

    • Verify if other user_type strings are valid in the broader system.
    • Add performance characteristics if this function handles high-frequency calls.
    • Define the expected numeric type for amount (e.g., Decimal vs Float) if precision is critical.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Paste the code and, if you have it, the existing documentation. This skill reads the whole body before writing — including the parts where side effects, validation, and error paths actually live — and drafts reference documentation covering parameters, defaults, return values, raised exceptions, and side effects, with every statement traceable to the code that proves it. Anything you asked for — or that reference docs conventionally cover — which the code does not prove (recommended settings, typical limits, use cases, the behaviour of helpers you did not paste) is never written into the draft as fact; it goes in a separate NOT IN CODE list, so the gaps are visible instead of filled with plausible guesses. When the existing documentation disagrees with the code, the code wins and every disagreement is listed, never silently overwritten. Each draft ends with exactly one verdict: DOCUMENTED or PARTIAL. It is a language-agnostic procedure that works from the code you provide. One thing to know before you use it: the verdict describes documentation coverage, not runtime verification — DOCUMENTED means the draft covers what the code proves, not that the code was executed or tested. In our own three-case contrast test, the verdict matched the answer key in only 1 of 3 cases; in the other 2 it came out PARTIAL because the skill counted unrequested unknowns, such as library return types, as gaps.

    Requires full code bodies, not just signatures. Cannot verify behaviors of external libraries or unprovided helper functions. Output is a draft, not a direct file edit.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Frequently Asked Questions

    This skill eliminates technical hallucinations by drafting documentation strictly from source code logic. It solves the problem of outdated READMEs and unverified assumptions by enforcing a code first approach where every statement must be traceable to a specific line or branch in the implementation.

    You only need to provide the source code you want documented and any existing documentation you wish to audit. The skill works best when you provide the full body of functions, including any internal helper logic you want analyzed.

    The skill produces a structured draft covering signatures, parameters, return values, explicit exceptions, and side effects. You also receive a NOT IN CODE list for unprovable details and a Discrepancies report if the code contradicts your old documentation.

    You can ask your agent to document a specific function, write the docs for an API endpoint, update a README for a provided code snippet, or check if existing docs are out of date. Simply paste the code and request a technical reference draft.

    The skill cannot document behaviors of external libraries or helper functions if their source code is not included in the provided context. It also refuses to guess at performance guarantees, use cases, or security properties that are not explicitly defined within the code logic.

    Every output ends with a verdict of either DOCUMENTED or PARTIAL. This tells you whether every requested detail was verified in the code or if some information was missing from the source and moved to the NOT IN CODE list.

    New in Technical Documentation

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Technical Documentation.

    Free