ownyourcode: Command for Claude Code

.claude/commands/own/advise.md

advise is a command for Claude Code from DanielPodolsky/ownyourcode. It costs 21 tokens per session (2,231 once invoked), scanned A, original, MIT.

A pre-work command that reviews earlier project learnings and consults research tools before a new coding task begins. It asks what kind of work is planned and which technical area and tools are involved.

In plain words
What is it for?
Use it before a feature, bug fix, refactor, or unscheduled task to review prior lessons, research practices, and form an initial plan.
Why use it?
It helps uncover relevant past mistakes and patterns before implementation starts. This can make planning more informed and reduce repeated errors.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

This is DanielPodolsky/ownyourcode's own configuration. It tells Claude Code how to work on ownyourcode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ownyourcode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DanielPodolsky/ownyourcode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DanielPodolsky/ownyourcode/main/.claude/commands/own/advise.md
Clone the repo
git clone --depth 1 https://github.com/DanielPodolsky/ownyourcode

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for advise

README.md
[![agentmods](https://agentmods.dev/badge/commands/danielpodolsky/ownyourcode/advise/github.svg)](https://agentmods.dev/commands/danielpodolsky/ownyourcode/advise)
Your own site
<a href="https://agentmods.dev/commands/danielpodolsky/ownyourcode/advise"><img src="https://agentmods.dev/badge/commands/danielpodolsky/ownyourcode/advise/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for advise

Your own site · 80×15
<a href="https://agentmods.dev/commands/danielpodolsky/ownyourcode/advise"><img src="https://agentmods.dev/badge/commands/danielpodolsky/ownyourcode/advise.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,231 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.02231
Opus 5.5 $0.00008 $0.00892
Sonnet 5.5 $0.00004 $0.00446
Haiku 4.5 $0.00002 $0.00223

Measured 1mo ago against content hash e484820aea92, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

advise scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/own/advise.md · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/own:advise

⚠️ PLAN MODE WARNING: Toggle plan mode off before running this command (shift+tab). OwnYourCode commands don't work correctly with plan mode.

Query past learnings and leverage research tools before starting a new task.

Overview

This command is run before starting new work. It:

  1. Understands what you're about to work on
  2. Queries your learning registry for relevant patterns/failures
  3. Uses MCPs to research best practices and implementations
  4. Surfaces past insights to prevent repeating mistakes
  5. Ensures you have a plan before coding

"Those who don't learn from history are doomed to rewrite it with bugs."


Execution Flow

Phase 1: What Are You About to Work On?

Question: "What are you about to work on?"

Options:
1. A new feature from my spec
   Description: Starting planned work

2. A bug fix
   Description: Something is broken

3. An improvement/refactor
   Description: Making existing code better

4. Something new (not specced)
   Description: Unplanned work

Follow-up:

  • "In a few words, what's the domain? (e.g., auth, forms, API, database, UI)"
  • "What libraries or frameworks are you using?"

Phase 2: Query Global Learning Registry

Read the global learning registry at ~/ownyourcode/learning/LEARNING_REGISTRY.md and search for:

  • Patterns matching the domain
  • Failures matching the domain
  • Recent learnings that might apply

Also check ~/ownyourcode/learning/patterns/ for any documented patterns in the domain.

Important: Learning is GLOBAL, not project-specific. This ensures learnings persist across all your projects.


Phase 3: Surface Relevant Learnings

If past learnings found:

┌─────────────────────────────────────────┐
│         RELEVANT PAST LEARNINGS         │
├─────────────────────────────────────────┤
│                                         │
│ 📚 PATTERNS YOU'VE USED                │
│ ─────────────────────────               │
│ • [Pattern Name] (2026-01-15)          │
│   "[Summary of what worked]"            │
│   Location: ~/ownyourcode/learning/...  │
│                                         │
│ ⚠️ FAILURES TO AVOID                   │
│ ─────────────────────────               │
│ • [Issue Name] (2026-01-01)            │
│   "[What went wrong and why]"           │
│   Location: ~/ownyourcode/learning/...  │
│                                         │
│ 💡 INSIGHTS                             │
│ ─────────────────────────               │
│ • "[Key insight from past work]"        │
│                                         │
└─────────────────────────────────────────┘

Read the full file on GitHub · 313 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 313 lines · 21 tokens per session scan A e484820aea92

Subscribe to this mod's changes

advise is a command published in the GitHub repository DanielPodolsky/ownyourcode (292 stars, last pushed 4mo ago), licensed MIT. It adds 21 tokens to every session and 2,231 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.