advise
Pre-work command that queries past learnings and leverages MCPs before starting a new task
Guide the junior through writing documentation for their project or code
$ npx -y skills add DanielPodolsky/ownyourcode --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/docsContext preview
What this command does when you run it.
Guide the junior through writing documentation for their project or code
name: docs description: Guide the junior through writing documentation for their project or code allowed-tools: Read, Glob, Grep, Write, Edit, AskUserQuestion, mcp__context7__resolve-library-id, mcp__context7__get-library-docs, mcp__octocode__githubSearchCode, mcp__octocode__githubGetFileContent
> ⚠️ **PLAN MODE WARNING:** Toggle plan mode off before running this command (`shift+tab`). OwnYourCode commands don't work correctly with plan mode.
Guide the junior through writing documentation. **They write the docs, you guide the structure.**
> "Code tells you HOW, comments tell you WHY. Good documentation explains the WHY that code cannot."
**This command does NOT:**
---
Question: "What do you need to document?" Options: 1. Project README Description: The main README.md for my project 2. Function/API documentation Description: JSDoc, docstrings, or API docs 3. Architecture decisions Description: Why we built it this way 4. Code comments Description: Inline explanations in code
---
Check what documentation exists:
# Look for README Glob: README.md, README.txt, readme.md # Look for existing docs Glob: docs/**/*.md, documentation/**/*.md # Check for JSDoc/docstrings Grep: @param, @returns, :param, :return
If README exists, read it and assess:
> "Let me see your current README... > > [Read file] > > Looking at this, can I answer these questions: > 1. What does this project do? (1 sentence) > 2. How do I install it? > 3. How do I use it? > > Let's fill in what's missing."
---
**NEVER give documentation advice without research.**
# Resolve library for documentation tools Use mcp__context7__resolve-library-id with libraryName: "jsdoc" # or "typedoc", "sphinx", "markdown" # Fetch best practices Use mcp__context7__get-library-docs with topic: "getting started" or "API documentation"
# Search for README patterns in popular repos Use mcp__octocode__githubSearchCode to find: - README structure in well-documented projects - JSDoc patterns in TypeScript repos - Documentation folder structures # Example searches: owner: "facebook", repo: "react", path: "README.md" keywordsToSearch: ["Installation", "Quick Start", "Contributing"]
Present findings:
> "Looking at how React's README is structured... > > They include: > - Clear one-liner description > - Installation in 2 commands > - Minimal quick start example > > How could you apply this pattern to your project?"
---
Reference: `.claude/skills/fundamentals/documentation/SKILL.md`
Guide them through the 5 essentials:
> "In ONE sentence, what does your project do?" > > Bad: "A project for managing things" > Good: "A CLI tool that converts Figma designs to React components"
Wait for their answer. Coach if needed.
> "What problem does this solve? Why would someone use it?" > > This is your pitch. What pain point motivated you to build this?
> "Write the exact commands to install this. Test them yourself." > > Can someone copy-paste these and have it work?
> "What's the simplest possible example that works?" > > Show the minimum viable usage. No edge cases, just "hello world."
> "If this is open source, how can people contribute?"
---
For code comments, teach the principle:
// ❌ BAD: Explains WHAT (code already says this) // Increment counter by 1 counter++; // ✅ GOOD: Explains WHY (context code can't provide) // Counter must be incremented before validation runs // to handle edge case where initial value is 0 counter++;
Ask:
> "Look at your comments. Do they explain WHY, or just repeat WHAT the code does?" > > If I delete the comment, is any context lost? If not, delete it.
---
For function documentation:
/**
* Brief description of what this function does.
*
* @param paramName - Description of parameter
* @returns Description of return value
*
* @example
* const result = myFunction('input');
*/Guide them:
> "For each exported function, ask yourself: > 1. What does it do? (1 sentence) > 2. What do the parameters mean? > 3. What does it return? > 4. Can you show a usage example? > > Write JSDoc for your main function. Show me what you've got."
---
When they've written something, review with questions:
> "Let me pretend I'm a developer who's never seen this project..."
For README:
For comments:
For JSDoc:
---
Watch for and call out:
| Mistake | Challenge | |---------|-----------| | "This project does stuff" | "Be specific. What does it actually do?" | | Outdated comments | "Does this comment still match the code?" | | Commented-out code | "Why is this here? Git has history." | | Magic numbers without explanation | "What does 3600 mean? Why this number?" | | `// Set x to 5`
Claude Code workflow for AI-mentored development. Work efficiently with Spec-Driven Development and the 6 Gates. Built to fight cognitive offloading — for developers using AI to grow and maintain ownership.
Repo: DanielPodolsky/ownyourcode
Pre-work command that queries past learnings and leverages MCPs before starting a new task
Complete a task with 6 Gates verification, code review, and career value extraction