بنقرة واحدة
research-codebase
Document codebase as-is with research directory for historical context.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Document codebase as-is with research directory for historical context.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
Delegate work to builtin or custom subagents with single-agent, chain, parallel, async, forked-context, and intercom-coordinated workflows. Use for parallel codebase discovery, debug-and-fix, refinement, and multi-step tasks where a single parent agent stays in control while specialist subagents contribute locate, analyze, pattern-find, research, debug, or simplify passes.
Streamline session-to-session coordination with the intercom extension. Send messages, delegate tasks, and coordinate work across multiple atomic sessions on the same machine. Use for planner-worker workflows, cross-session context sharing, and real-time collaboration between sessions.
Create a detailed execution plan/spec/PRD for implementing features or refactors in a codebase, designed around the program's entrypoints, the doors that carry domain intent, by leveraging existing research in the codebase.
Control tmux-compatible sessions/windows/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
| name | research-codebase |
| description | Document codebase as-is with research directory for historical context. |
You are tasked with conducting comprehensive research across the codebase to answer user questions by spawning parallel sub-agents and synthesizing their findings.
The user's research question/request is: $ARGUMENTS
<EXTREMELY_IMPORTANT>
</EXTREMELY_IMPORTANT>
Read any directly mentioned files first:
readFile tool WITHOUT limit/offset parameters to read entire filesDetermine the compatibility posture:
breaking_changes_allowed: true.breaking_changes_allowed: false.## Compatibility Context section.breaking_changes_allowed: true, document existing legacy behavior, compatibility shims, optional flags, and public APIs as current state, not as constraints future specs must preserve unless the user explicitly asks for preservation.breaking_changes_allowed: false, document public APIs, compatibility-sensitive surfaces, downstream callers, migration constraints, and behavior that future work must preserve.Analyze and decompose the research question:
Spawn parallel sub-agent tasks:
For codebase research:
research/docs/ relative to the current working directoryresearch/docs/2024-01-10-database-implementation.mdresearch/docs/2024-01-11-authentication-flow.mdIMPORTANT: All agents are documentarians, not critics. They will describe what exists without suggesting improvements or identifying issues.
For research directory:
For online search:
The agent fetches live web content using the playwright-cli skill's playwright-cli command (or npx playwright-cli / curl). Instruct it to apply the token-efficient fetch order: (1) try curl https://<site>/llms.txt for an AI-friendly index (see llmstxt.org), (2) try curl <url> -H "Accept: text/markdown" to get pre-converted Markdown (supported on Cloudflare-hosted docs via Markdown for Agents), (3) fall back to HTML parsing via playwright-cli
Instruct the agent to return LINKS with their findings and INCLUDE those links in the research document
The agent should persist reusable source documents under research/web/<YYYY-MM-DD>-<kebab-case-topic>.md (with frontmatter noting source_url, fetched_at, and fetch_method) so future research can reuse them without re-fetching
Output directory for the synthesized web research artifacts: research/web/:
When you fetch a document that is worth keeping for future sessions (reference docs, API schemas, SDK guides, release notes, troubleshooting writeups, architecture articles), write it to research/web/<YYYY-MM-DD>-<kebab-case-topic>.md with frontmatter capturing:
---
source_url: <original URL>
fetched_at: <YYYY-MM-DD>
fetch_method: read | llms.txt | markdown-accept-header | browser | browse
topic: <short description>
---
Followed by the extracted content (trimmed of nav chrome, ads, and irrelevant boilerplate). This lets future work reuse the lookup without re-fetching. Before fetching anything, quickly find research/web/ for an existing, recent copy.
Examples:
Redis locks usage, the agent might find relevant usage and create a document research/web/2024-01-15-redis-locks-usage.md with internal links to Redis docs and code references (and cache the fetched Redis docs under research/web/)OAuth flows, the agent might find relevant external articles and create a document research/web/2024-01-16-oauth-flows.md with links to those articlesThe key is to use these agents intelligently:
breaking_changes_allowed: true or breaking_changes_allowed: false in each sub-agent prompt so compatibility-sensitive findings are documented with the right posture.Wait for all sub-agents to complete and synthesize:
Generate research document:
research/
├── tickets/
│ ├── YYYY-MM-DD-XXXX-description.md
├── docs/
│ ├── YYYY-MM-DD-topic.md
├── notes/
│ ├── YYYY-MM-DD-meeting.md
├── ...
└──
Naming conventions:
2025-01-08-1478-parent-child-tracking.md2025-01-08-authentication-flow.mdStructure the document with YAML frontmatter followed by content:
---
date: !`date '+%Y-%m-%d %H:%M:%S %Z'`
researcher: [Researcher name from thoughts status]
git_commit: !`git rev-parse --verify HEAD 2>/dev/null || echo "no-commits"`
branch: !`git branch --show-current 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unborn"`
repository: !`basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown-repo"`
topic: "[User's Question/Topic]"
tags: [research, codebase, relevant-component-names]
status: complete
last_updated: !`date '+%Y-%m-%d'`
last_updated_by: [Researcher name]
breaking_changes_allowed: [true or false]
compatibility_context: "[Short explanation of downstream-user/API compatibility posture]"
---
# Research
## Research Question
[Original user query]
## Compatibility Context
[State whether breaking changes are allowed. If true, note that existing compatibility shims, optional flags, legacy APIs, and public APIs are documented as current state rather than preservation constraints. If false, summarize compatibility-sensitive surfaces, downstream users/callers, migration constraints, and behavior future work must preserve.]
## Summary
[High-level documentation of what was found, answering the user's question by describing what exists]
## Detailed Findings
### [Component/Area 1]
- Description of what exists ([file.ext:line](link))
- How it connects to other components
- Current implementation details (without evaluation)
### [Component/Area 2]
...
## Code References
- `path/to/file.py:123` - Description of what's there
- `another/file.ts:45-67` - Description of the code block
## Architecture Documentation
[Current patterns, conventions, and design implementations found in the codebase]
## Historical Context (from research/)
[Relevant insights from research/ directory with references]
- `research/docs/YYYY-MM-DD-topic.md` - Information about module X
- `research/notes/YYYY-MM-DD-meeting.md` - Past notes from internal engineering, customer, etc. discussions
- ...
## Related Research
[Links to other research documents in research/]
## Open Questions
[Any areas that need further investigation]
Add GitHub permalinks (if applicable):
git branch --show-current and git statusgh repo view --json owner,namehttps://github.com/{owner}/{repo}/blob/{commit}/{file}#L{line}Present findings:
Handle follow-up questions:
last_updated and last_updated_by to reflect the updatelast_updated_note: "Added follow-up research for [brief description]" to frontmatter## Follow-up Research [timestamp]Please DO NOT implement anything in this stage, just create the comprehensive research document
Always use parallel Task agents to maximize efficiency and minimize context usage
Always run fresh codebase research - never rely solely on existing research documents
The research/ directory provides historical context to supplement live findings
Focus on finding concrete file paths and line numbers for developer reference
Research documents should be self-contained with all necessary context
Each sub-agent prompt should be specific and focused on read-only documentation operations
Document cross-component connections and how systems interact
Include temporal context (when the research was conducted)
Link to GitHub when possible for permanent references
Keep the main agent focused on synthesis, not deep file reading
Have sub-agents document examples and usage patterns as they exist
Explore all of research/ directory, not just research subdirectory
CRITICAL: You and all sub-agents are documentarians, not evaluators
REMEMBER: Document what IS, not what SHOULD BE
NO RECOMMENDATIONS: Only describe the current state of the codebase
File reading: Always read mentioned files FULLY (no limit/offset) before spawning sub-tasks
Compatibility posture: Always determine breaking_changes_allowed before decomposing the question. This is a single project/research posture, not a request to add compatibility flags. Use it to document whether old APIs and shims are constraints for future work.
Critical ordering: Follow the numbered steps exactly
Frontmatter consistency:
last_updated, git_commit)research/ directory.