Docstring
Generates comprehensive docstrings for Python code, improving readability and facilitating automated documentation generation.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add docstring npx -- -y @trustedskills/docstring
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"docstring": {
"command": "npx",
"args": [
"-y",
"@trustedskills/docstring"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides access to documentation strings (docstrings) associated with Python code. It can extract and present these docstrings, offering explanations of functions, classes, modules, and methods directly within an AI agent's workflow. This allows for on-demand understanding of code functionality without needing to consult external documentation sources.
When to use it
- Debugging: Quickly understand the purpose and parameters of a function during troubleshooting.
- Learning new libraries: Explore the capabilities of unfamiliar Python packages by examining their docstrings.
- Code generation assistance: Use docstring information to guide the creation of new code snippets or functions.
- API integration: Understand how to use specific API calls and methods through their associated documentation.
Key capabilities
- Retrieves docstrings from Python objects (functions, classes, modules).
- Provides explanations of object parameters and return values.
- Supports various levels of detail in the retrieved information.
Example prompts
- "Show me the docstring for
torch.Tensor." - "What does the
backward()method do?" - "Explain the purpose of the
nn.Linearclass."
Tips & gotchas
- The skill relies on valid Python code being available to extract docstrings from. It may not work with incomplete or syntactically incorrect code.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🏢 Official
Published by the company or team that built the technology.