Code Research Crafter
/install code-research-crafter
\r \r
Code Research Crafter\r
\r Craft comprehensive research proposals from code analysis to GitHub RFC publication.\r \r
Workflow\r
\r
Phase 1: Problem Discovery & Code Analysis\r
\r
- Ask the user for the target codebase (URL or local path) and the research topic. If neither is provided, do not proceed — ask the user to clarify.\r
- Map the project structure: use
glob **/*.{ts,js,py,go,rs,java}based on the detected language. ReadREADME.md,CONTRIBUTING.md, and docs indocs/for context.\r - Search for topic-relevant files:
grep "[keyword]" src/**to locate key implementations.\r - Read the top relevant files and document findings in
research-context.md:\r- Code Map: file paths and their roles (table format)\r
- Problem List: each problem with
file:linereference and severity (high/medium/low)\r - Metrics: quantified issues (e.g., "3/10 modules lack error handling", "40% of functions have no tests")\r
- Search existing GitHub issues:
gh issue list -R [repo] --search "[topic]" --limit 20.\r \r Error handling: If the codebase is inaccessible, ask for an alternative URL or local path. If the topic is too broad, narrow down with the user before proceeding.\r \r
Phase 2: Academic & Community Research\r
\r
- Load
references/academic-research-guide.mdfor search methodology.\r - Use WebSearch for academic papers:
"site:arxiv.org [topic] 2024 2025","site:scholar.google.com [topic]".\r - Use WebFetch to read top 3-5 relevant papers and extract: algorithms, data structures, evaluation methods.\r
- Search GitHub discussions:
gh api repos/[owner]/[repo]/discussions --jq '.[].title'(if discussions are enabled).\r - Analyze community sentiment from issues: note pain points, feature requests, and maintainer feedback patterns.\r
- Append findings to
research-context.mdunder sections:\r- Academic Insights: algorithms, approaches, evaluation metrics\r
- Community Pulse: top pain points, requested features, maintainer stance\r
- Gaps: current implementation vs. best practices\r \r Error handling: If no academic papers are found, note the gap and proceed with community research only. If the repo has no issues/discussions, focus on academic research and documentation review.\r \r
Phase 3: Solution Design\r
\r
- Load
references/architecture-patterns.mdfor proven design patterns.\r - Define evidence-based design principles derived from Phase 1-2 findings.\r
- Design a layered architecture:\r
- Layer 1 — Foundation: data collection and storage\r
- Layer 2 — Enhancement: core features building on Foundation\r
- Layer 3 — Intelligence: AI/ML capabilities on accumulated data\r
- Layer 4 — Governance: control, monitoring, and policy enforcement\r
- Define data models: dual-track (user-defined/static + system-learned/dynamic).\r
- Plan phased implementation with milestones:\r
- Phase 1 → Foundation (weeks 1-4)\r
- Phase 2 → Enhancement (weeks 5-8)\r
- Phase 3 → Intelligence (weeks 9-12)\r
- Phase 4 → Governance (weeks 13-16)\r
- Document trade-offs: migration path, backward compatibility, performance cost, risk assessment.\r \r Checkpoint: Present the proposed solution design to the user. Wait for approval before proceeding. If the user requests changes, iterate on the design and re-present.\r \r
Phase 4: Documentation Generation\r
\r
- Determine language needs:\r
- If the target project's primary language is Chinese → generate bilingual (Chinese + English) documents\r
- If the target project is international → generate English-only documents\r
- Always generate the RFC in English (the lingua franca of open source)\r
- Generate a structured technical document using python-docx (if available) or markdown:\r
- Include: table of contents, numbered headings, citations, references section\r
- Use consistent terminology throughout\r
- Save as
proposal.md(andproposal.docxif python-docx is available)\r \r
Phase 5: RFC Writing\r
\r
- Load
references/rfc-template.mdfor the standard RFC template.\r - Write the RFC in English with these required sections:\r
# RFC: [Title]\r
\r
Metadata\r
- Author: [name]\r
- Date: [YYYY-MM-DD]\r
- Status: Draft\r
- Related Issues: #[issue numbers]\r \r
Problem Statement\r
[Quantified problem with code evidence and metrics]\r \r
Prior Art\r
[Academic research, existing solutions, and community context]\r \r
Proposed Solution\r
[Architecture, data models, API design, implementation phases]\r \r
Trade-offs\r
[Cost analysis, migration path, backward compatibility, risks]\r \r
Open Questions\r
[Unresolved decisions needing community input]\r \r
Call for Collaboration\r
[How to get involved, what help is needed]\r
3. Include code examples (with syntax highlighting) and ASCII architecture diagrams.\r
4. Reference specific GitHub issues and discussions using `#123` format.\r
5. Self-review: verify every claim has a citation (code location or paper reference).\r
\r
### Phase 6: GitHub Publication\r
\r
1. Check authentication: `gh auth status`. If not authenticated, provide setup instructions and ask the user to configure.\r
2. Save the RFC as `rfc-[slug].md` in the project's `docs/` or `proposals/` directory.\r
3. Create a GitHub issue:\r
```bash\r
gh issue create -R [owner]/[repo] \\r
--title "RFC: [Title]" \\r
--body-file rfc-[slug].md \\r
--label "enhancement" --label "RFC"\r
```\r
4. If `gh` CLI is unavailable, try GitHub API via `curl`:\r
```bash\r
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \\r
https://api.github.com/repos/[owner]/[repo]/issues \\r
-d '{"title":"RFC: [Title]","body":"[RFC content]","labels":["enhancement","RFC"]}'\r
```\r
5. If all CLI options fail, output the RFC markdown with manual submission instructions:\r
- URL to create issue: `https://github.com/[owner]/[repo]/issues/new`\r
- Suggested title and labels\r
- Full RFC content to paste\r
6. Reference related issues in the created issue body. Do NOT tag maintainers unless the user explicitly asks.\r
\r
## Output Artifacts\r
\r
| Artifact | Format | Description |\r
|----------|--------|-------------|\r
| `research-context.md` | Markdown | Running document updated through Phases 1-3 |\r
| `proposal.md` / `proposal.docx` | MD/DOCX | Structured technical document |\r
| `rfc-[slug].md` | Markdown | RFC in standard format |\r
| GitHub Issue | Web | Link to published RFC |\r
\r
## Best Practices\r
\r
1. **Quote specific code locations** — always reference file paths and line numbers\r
2. **Quantify problems** — use metrics like "50% of files" or "3x performance improvement"\r
3. **Cite recent research** — prefer papers from 2024-2025\r
4. **Design for adoption** — include migration paths and gradual rollout plans\r
5. **Track costs** — document token usage, performance implications, and resource requirements\r
6. **Engage early** — reference existing issues and invite collaboration from the start\r
7. **Self-review citations** — verify every claim has a code location or paper reference\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install code-research-crafter - After installation, invoke the skill by name or use
/code-research-crafter - Provide required inputs per the skill's parameter spec and get structured output
What is Code Research Crafter?
Research codebases and craft professional RFC proposals for GitHub publication. Use when: user wants to analyze a codebase and propose enhancements, write an... It is an AI Agent Skill for Claude Code / OpenClaw, with 319 downloads so far.
How do I install Code Research Crafter?
Run "/install code-research-crafter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Code Research Crafter free?
Yes, Code Research Crafter is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Code Research Crafter support?
Code Research Crafter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Code Research Crafter?
It is built and maintained by ZhangYuanzhuo (@zz0116); the current version is v1.1.0.