Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/Larens94/codednaWrote 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.
[](https://agentmods.dev/rules/larens94/codedna/windsurfrules)<a href="https://agentmods.dev/rules/larens94/codedna/windsurfrules"><img src="https://agentmods.dev/badge/rules/larens94/codedna/windsurfrules/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.
<a href="https://agentmods.dev/rules/larens94/codedna/windsurfrules"><img src="https://agentmods.dev/badge/rules/larens94/codedna/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01203 | $0.01203 |
| Opus 5.5 | $0.00481 | $0.00481 |
| Sonnet 5.5 | $0.00241 | $0.00241 |
| Haiku 4.5 | $0.00120 | $0.00120 |
Grade A, and why
windsurfrules 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeDNA v0.9 — In-Source Communication Protocol
Setup: pipx install git+https://github.com/Larens94/codedna.git && codedna install --path . --tools windsurf --no-wiki-sync && codedna init . --no-llm
Every supported source file must start with a CodeDNA header using native comment syntax. Python uses a module docstring; non-Python files must use their language's valid comment form.
Required command workflow
- Onboarding:
codedna doctor --path . - Before changing a public contract:
codedna impact <file-or-symbol> --path . - After structural edits:
codedna verify .; review evidence beforecodedna refresh . - Use
--jsonin automation; verification is structural, not semantic
Module docstring format
"""filename.py — <what it does, ≤15 words>.
exports: public_function(arg) -> return_type
used_by: consumer_file.py → consumer_function
rules: <hard constraint agents must never violate>
agent: <model-id> | <provider> | <YYYY-MM-DD> | <session_id> | <what you did and what you noticed>
message: "<open hypothesis or observation for the next agent>"
"""
Rules on every edit
- Read
.codednaat repo root first — project structure and recent session history - Re-read
rules:as your first step — never violate these constraints - Read
Rules:in function docstrings before writing logic there - Check
used_by:after changes — update callers if signatures change - Never rename
exports:symbols without explicit instruction - If you discover a constraint or fix a bug, add it to
rules:for the next agent - After editing, append a new
agent:line to the module docstring. Keep only the last 5 entries — drop the oldest if adding a 6th. Full history is in git and.codedna.
Rules on generate
- Write the module docstring before any imports
- Every public function must have a
Rules:docstring - Use semantic variable names:
list_dict_users_from_db = get_users()
Writing good rules:
rules: must be specific and actionable — never vague.
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.
- 2mo ago First seen · 129 lines · 1,203 tokens per session scan A a5ee0a1a52dc
windsurfrules is a cursor rule published in the GitHub repository Larens94/codedna (151 stars, last pushed 1mo ago), licensed MIT. It adds 1,203 tokens to every session, about $0.0048 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-09-07.
windsurfrules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| windsurfrulesLarens94/codedna | Cursor rule | 151 | 1mo ago | MIT | A | 1,203 | Windsurf |
| 02-python-standardsMarcoPorcellato/matryca-plumber | Cursor rule | 103 | today | Apache-2.0 | A | 0 | Cursor |
| pagerduty-mcp-serverwpfleger96/pagerduty-mcp-server | Cursor rule | 8 | today | MIT | A | 1,251 | Cursor |
| pythonatlanhq/agent-toolkit | Cursor rule | 42 | 19d ago | MIT | A | 213 | Cursor |
| react-vite-tanstackunoplat/unoplat-code-confluence | Cursor rule | 93 | 25d ago | none | A | 631 | Cursor |
| windsurfrulesunoplat/unoplat-code-confluence | Cursor rule | 93 | 25d ago | none | — | — | Windsurf |
| ponytailDietrichGebert/ponytail | Cursor rule | 202k | 9d ago | MIT | A | 604 | Cursor |