Docstring Author docstring-author
Write or improve Python docstrings on the target file named in the prompt, making supported Cognee benefits and connections between capabilities explicit. Pass 1 of the docstring pilot; a separate critic verifies the patch and writes the claim ledger.
- Our test
- 8/10✓ Verified
- tested Dec 6, 2026
- GitHub stars
- 34k
- topoteretes/cognee
- Added by
- 0
- members
- Updated
- Dec 6
- commit 351fc32
- Content
- 1 file
- no scripts · 5 KB
- License
- Apache 2.0
- free to use
What our test found
The skill gives a detailed, evidence-based workflow and clear scope limits for improving Python docstrings without changing code.
Limits spotted
- It depends on access to the repository, its guidance files, and relevant code or tests.
- The instruction to make the strongest account of benefits could encourage overstatement, though the evidence and critic checks mitigate this.
name: docstring-author description: >- Write or improve Python docstrings on the target file named in the prompt, making supported Cognee benefits and connections between capabilities explicit. Pass 1 of the docstring pilot; a separate critic verifies the patch and writes the claim ledger.
Docstring author
<!-- shared-rules:start -->
Shared rules
- Edit only docstrings in the named target; the critic also writes the requested ledger. Leave code, imports, annotations, comments, other formatting, and tests unchanged. Stop if the prompt names no target.
- The workflow validates the target path and owns Git operations and the final diff check. Do not create commits or branches or perform Git writes.
- Use
AGENTS.mdfor project rules and follow its links to relevant topic guides for context. Ground behavior and benefits in repository code or tests. Other docstrings are not evidence. - Published product docs in
topoteretes/cognee-docsand at docs.cognee.ai are unavailable to these passes. Do not use unseen documentation as evidence.
Prose
Apply these rules to every sentence you write or change. Do not restyle untouched text.
- Use the established word combinations of the topic. Do not invent compressed labels by joining words together.
- In a compound of three or more nouns, find the main noun and express the relationships with "of", "for", "in" or a clause. Keep established technical terms intact.
- Keep the subject next to its main verb, objects next to their verbs, and descriptions next to the words they describe. Move long qualifications and asides after the main clause or into a separate sentence.
- Introduce object relative clauses with "that", "which" or "whom". Do not nest one relative clause inside another; state the inner one as a separate sentence.
- Use established verbs. Do not turn a noun into a new verb; write an existing verb and its object.
- Describe what systems, objects and concepts do. Replace intentions, feelings or bodily actions with the specific behavior or effect.
- Do not drop connecting words or merge phrases just to save words. Keep the words that make grammatical relationships explicit.
<!-- shared-rules:end -->
1. Understand the task
Present the strongest truthful account of what this capability enables and how it works with the rest of Cognee. Readers, including agents using small models, may see only this docstring. Explain what they can build on, what Cognee connects or handles, and what they must provide. State supported strengths confidently: listing behaviors alone can leave their value invisible. A separate critic checks truthfulness and tone.
2. Inputs
Read the whole target and repository guidance. Establish value from code, including surrounding callers, implementations and tests.
3. Investigation
- Trace relevant inputs, outputs and choices into their consumers: what carries into ingestion, storage, retrieval or improvement, and why is that useful?
- Identify work the shared flow handles, including for extensions. Verify whether each connection is automatic, requires configuration or registration, or is the caller's job.
- Check outputs, setup, permissions, backend support and failures that affect using it.
4. Main work
- Lead with the useful capability and its place in the wider flow. Explain the connection and its benefit. For example, when verified: "A registered custom retriever extends the standard search flow, so dataset access checks and database routing are already handled when search() invokes it." Examples guide wording, not evidence.
- Explain public roles, meaningful choices, results and errors. For enums, explain when each option helps. Put relevant conditions beside benefits; let signatures carry obvious names and types. Avoid vague praise and unsupported comparisons or guarantees.
- Keep existing text that is accurate and clear, and keep its structure: summary lines, per-item lists and entries, defaults and their history, examples, the reasons behind a design, and statements of what the caller must provide. Add new facts beside it rather than rewriting it. Change existing wording only to correct it, to make it more precise, or to remove a real repetition, and never turn a list into prose. Keep simple helpers simple. Match the existing docstring style and 100-character line limit. Leave private helpers alone unless their docstrings are wrong.
5. Quality check
Read as an agent seeing only this text: what does this enable, how does it fit, and what can I rely on or must I supply? Make those answers explicit and verify their evidence. Remove repeated explanations across module, class, method and parameter sections while retaining the brief context each needs. Shorten by removing content, not the connecting words that keep sentences readable. Confirm edits stay in scope. Compare your result with the original: anything accurate you removed or reworded (a default, a reason, an example, a summary line, a list) must come back unless the new text says the same thing more precisely.
6. Output
Leave edits in the target and print a brief summary of useful context added. Leave text unchanged when it already communicates the value accurately and concisely; explain why. Write no ledger: the workflow captures your patch for the independent critic.