Pocket Flow: Codebase to Tutorial is a tutorial project that demonstrates an AI agent which examines GitHub repositories and turns their code into beginner-friendly tutorials. It is for learning how codebases work through explanations, identified abstractions, relationships, and visualizations, using Pocket Flow’s small LLM framework.
Borrowing it
Nothing to install: this file belongs to The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge/main/.cursorrulesgit clone --depth 1 https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-KnowledgeWrote 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/the-pocket/pocketflow-tutorial-codebase-knowledge/cursorrules)<a href="https://agentmods.dev/rules/the-pocket/pocketflow-tutorial-codebase-knowledge/cursorrules"><img src="https://agentmods.dev/badge/rules/the-pocket/pocketflow-tutorial-codebase-knowledge/cursorrules/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/the-pocket/pocketflow-tutorial-codebase-knowledge/cursorrules"><img src="https://agentmods.dev/badge/rules/the-pocket/pocketflow-tutorial-codebase-knowledge/cursorrules.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.00000 | $0.13624 |
| Opus 5.5 | $0.00000 | $0.05450 |
| Sonnet 5.5 | $0.00000 | $0.02725 |
| Haiku 4.5 | $0.00000 | $0.01362 |
Grade A, and why
cursorrules 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- cursorrules — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 1,664 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agentic Coding: Humans Design, Agents code!
If you are an AI agents involved in building LLM Systems, read this guide VERY, VERY carefully! This is the most important chapter in the entire document. Throughout development, you should always (1) start with a small and simple solution, (2) design at a high level (
docs/design.md) before implementation, and (3) frequently ask humans for feedback and clarification. {: .warning }
Agentic Coding Steps
Agentic Coding should be a collaboration between Human System Design and Agent Implementation:
| Steps | Human | AI | Comment |
|---|---|---|---|
| 1. Requirements | ★★★ High | ★☆☆ Low | Humans understand the requirements and context. |
| 2. Flow | ★★☆ Medium | ★★☆ Medium | Humans specify the high-level design, and the AI fills in the details. |
| 3. Utilities | ★★☆ Medium | ★★☆ Medium | Humans provide available external APIs and integrations, and the AI helps with implementation. |
| 4. Node | ★☆☆ Low | ★★★ High | The AI helps design the node types and data handling based on the flow. |
| 5. Implementation | ★☆☆ Low | ★★★ High | The AI implements the flow based on the design. |
| 6. Optimization | ★★☆ Medium | ★★☆ Medium | Humans evaluate the results, and the AI helps optimize. |
| 7. Reliability | ★☆☆ Low | ★★★ High | The AI writes test cases and addresses corner cases. |
- Requirements: Clarify the requirements for your project, and evaluate whether an AI system is a good fit.
- Understand AI systems' strengths and limitations:
- Good for: Routine tasks requiring common sense (filling forms, replying to emails)
- Good for: Creative tasks with well-defined inputs (building slides, writing SQL)
- Not good for: Ambiguous problems requiring complex decision-making (business strategy, startup planning)
- Keep It User-Centric: Explain the "problem" from the user's perspective rather than just listing features.
- Balance complexity vs. impact: Aim to deliver the highest value features with minimal complexity early.
- Understand AI systems' strengths and limitations:
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 · 1,664 lines · 0 tokens per session scan A f2b18dceffa3
cursorrules is a cursor rule published in the GitHub repository The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge (12,731 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 13,624 tokens. 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.
Other cursor rules, from other repositories
react
React, TypeScript, and web development best practices for performance optimization.
main
NornWeave is an open-source, self-hosted Inbox-as-a-Service API for AI Agents. It provides a stateful email layer (Inboxes, Threads, History) and an intelligent layer (Markdown parsing, Semantic Search) for LLMs via REST or MCP.
performance-optimization-rule
Rules to optimize performance of React and TypeScript components.
ui-and-styling-rule
Guidelines for UI and styling, focusing on Tailwind CSS and Shaden UI best practices.
go-api-handlers
Use authorization functions for apps.
frontend-structure
Frontend frameworks, file structure.