Install
$ agentstack add skill-wanshuiyin-auto-claude-code-research-in-sleep-grant-proposal ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Grant Proposal: From Research Ideas to Fundable Application
Draft a grant proposal based on: $ARGUMENTS
Overview
This skill turns validated research ideas into a structured, reviewer-ready grant proposal. It chains sub-skills into a grant-specific pipeline:
/research-lit → /novelty-check → [structure design] → [draft] → /research-review → [revise] → GRANT_PROPOSAL.md
(survey) (verify gap) (aims + matrix) (prose) (panel review) (fix) (done!)
This is a parallel branch, not part of the linear Workflow 1→1.5→2→3 pipeline. After /idea-discovery produces validated ideas, the user can either:
- Go to
/experiment-bridge→/auto-review-loop→/paper-writing(implement & publish) - Go to
/grant-proposal(write funding application first, then implement after funding)
┌→ /experiment-bridge → /auto-review-loop → /paper-writing (publish track)
/idea-discovery ────┤
└→ /grant-proposal → [get funded] → /experiment-bridge → ... (funding track)
Grant proposals argue for future work (feasibility + potential), not completed work (results + claims). This skill handles the unique requirements of grant writing: narrative arc design, reviewer-facing structure, budget justification, timeline planning, and agency-specific formatting.
Constants
- GRANT_TYPE =
KAKENHI— Default grant type. Supported:KAKENHI,NSF,NSFC,ERC,DFG,SNSF,ARC,NWO,GENERIC. Override via argument (e.g.,/grant-proposal "topic — NSF"). - GRANT_SUBTYPE =
auto— Sub-type within the grant agency. Examples: KAKENHIStart-up/Wakate/Kiban-B; NSFCYouth/Excellent-Youth/Distinguished/Overseas/Key; NSFCAREER/CRII/Standard. Auto-detected from argument or defaults to the most common sub-type. - REVIEWER_MODEL =
gpt-5.5— Model used via Codex MCP for proposal review. Must be an OpenAI model (e.g.,gpt-5.5,o3,gpt-4o). - OUTPUT_FORMAT =
markdown— Output format. Supported:markdown,latex. LaTeX uses grant-specific templates when available. - MAXREVIEWROUNDS = 2 — Maximum external review-revise cycles before finalizing.
- OUTPUT_DIR =
grant-proposal/— Directory for generated proposal files. - LANGUAGE =
auto— Output language. Auto-detected from grant type: KAKENHI→Japanese, NSF→English, NSFC→Chinese, ERC→English, DFG→English (or German), SNSF→English, ARC→English, NWO→English. Override explicitly if needed. - AUTO_PROCEED = false — At each checkpoint, always wait for explicit user confirmation before proceeding. Grant proposals require PI-specific judgment at every stage. Set
trueonly if user explicitly requests fully autonomous mode.
> 💡 These are defaults. Override by telling the skill, e.g., /grant-proposal "topic — NSF CAREER, latex output" or /grant-proposal "topic — NSFC Youth, language: English".
Optional: Style reference (— style-ref: , opt-in)
Lets the PI steer the proposal's structural layout (section order tendency, paragraph length, figure density, citation style) toward a successful past proposal or paper they'd like to mirror. Default OFF — when the user does not pass — style-ref, do nothing differently from before.
Only when — style-ref: appears in $ARGUMENTS, run the helper FIRST, before drafting:
# Resolve $STYLE_HELPER via the canonical strict-safe chain (see
# shared-references/integration-contract.md §2). Policy A — gate:
# unresolved helper means --style-ref cannot be satisfied, so abort.
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" || exit 1
if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills.txt ]; then
ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills.txt 2>/dev/null) || true
fi
STYLE_HELPER=".aris/tools/extract_paper_style.py"
[ -f "$STYLE_HELPER" ] || STYLE_HELPER="tools/extract_paper_style.py"
[ -f "$STYLE_HELPER" ] || { [ -n "${ARIS_REPO:-}" ] && STYLE_HELPER="$ARIS_REPO/tools/extract_paper_style.py"; }
[ -f "$STYLE_HELPER" ] || {
echo "ERROR: extract_paper_style.py not resolved at .aris/tools/, tools/, or \$ARIS_REPO/tools/." >&2
echo " Fix: rerun bash tools/install_aris.sh, export ARIS_REPO, or copy the helper to tools/." >&2
echo " --style-ref cannot be satisfied; aborting." >&2
exit 1
}
STYLE_STATUS=0
CACHE=$(python3 "$STYLE_HELPER" --source "") || STYLE_STATUS=$?
case "$STYLE_STATUS" in
0) ;; # use $CACHE/style_profile.md as structural guidance
2) echo "warning: style-ref skipped (missing optional dep)" >&2 ;;
3) echo "error: --style-ref source failed; aborting proposal" >&2 ; exit 1 ;;
*) echo "error: helper failed unexpectedly; aborting proposal" >&2 ; exit 1 ;;
esac
Sources accepted: local TeX dir / file, local PDF, arXiv id, http(s) URL. Overleaf URLs/IDs are rejected — clone the project locally first and pass the local path.
Strict rules (full contract in tools/extract_paper_style.py docstring):
- Use
style_profile.mdto align paragraph length tendency, figure budget, and citation density. Grant-type-mandated section order (KAKENHI 研究目的 → 研究計画・方法 → 準備状況, NSF Intellectual Merit → Broader Impacts, etc.) always takes precedence — the agency template wins, the style ref only refines secondary structure. - Never copy proposal prose, claims, vision statements, or budget items from anything reachable through the cache. The reference might be someone else's funded proposal; reproducing language risks plagiarism.
- Never pass
— style-ref(or the cache contents) to the GPT-5.5 reviewer sub-agent when it scores the draft — the proposal must be judged on its own merits.
Grant Type Specifications
KAKENHI (Japan — JSPS)
| Field | Detail | |-------|--------| | Sections | 研究目的 (Research Objective), 研究計画・方法 (Plan & Methods), 準備状況 (Preparation Status), 人権の保護 (Ethics, if applicable) | | Sub-types | 基盤研究 A/B/C (Kiban), 若手研究 (Wakate), 研究活動スタート支援 (Start-up), 国際共同研究 (International), 学術変革領域 (Transformative), 挑戦的研究 (Challenging), DC1/DC2 (doctoral) | | Language | Japanese (English technical terms acceptable) | | Review criteria | 学術的重要性 (academic significance), 独創性 (originality), 研究計画の妥当性 (plan feasibility), 研究遂行能力 (PI capability) | | Cultural norms | Explicit yearly milestones (Year 1 / Year 2), budget justification integrated into plan, emphasize 社会的意義 (societal significance), concrete expected outputs (papers, datasets), reference KAKEN database for related funded projects |
NSF (US)
| Field | Detail | |-------|--------| | Sections | Project Summary (1p), Project Description (15p max), References Cited, Biographical Sketch, Budget Justification, Data Management Plan | | Sub-types | Standard Grant, CAREER (early career), CRII (research initiation), RAPID, EAGER | | Language | English | | Review criteria | Intellectual Merit, Broader Impacts | | Cultural norms | Aim-based structure (Aim 1/2/3), preliminary data strongly expected, broader impacts must be concrete and specific (not generic "benefit society"), Results from Prior Support section |
NSFC (China — 国家自然科学基金)
| Field | Detail | |-------|--------| | Sections | 立项依据 (Rationale & Significance), 研究内容 (Content), 研究目标 (Objectives), 研究方案 (Plan & Methods), 可行性分析 (Feasibility), 创新性 (Innovation Points), 预期成果 (Expected Outcomes), 研究基础 (PI Foundation & Track Record) | | Sub-types | 面上项目 (General Program) — emphasis on scientific problem and research accumulation; 青年基金 (Young Scientists Fund) — age ≤35, emphasis on independence and growth potential; 优秀青年基金/优青 (Excellent Young Scientists) — age ≤38, emphasis on outstanding achievements; 杰出青年基金/杰青 (Distinguished Young Scientists) — age ≤45, emphasis on international-leading level; 海外优青 (Overseas Excellent Young Scientists) — emphasis on overseas experience and return contribution plan; 重点项目 (Key Program) — emphasis on systematic in-depth research | | Language | Chinese | | Review criteria | 科学意义 (scientific significance), 创新性 (innovation), 可行性 (feasibility), 研究队伍 (team qualification) | | Cultural norms | Heavy emphasis on 国际前沿 (international frontier) positioning, detailed feasibility analysis, explicit citation of applicant's prior publications, 研究基础 section is critical for demonstrating PI capability |
ERC (EU — European Research Council)
| Field | Detail | |-------|--------| | Sections | Extended Synopsis (5p), Scientific Proposal Part B2 (15p) | | Sub-types | Starting Grant (2-7 years post-PhD), Consolidator Grant (7-12 years), Advanced Grant (established leaders) | | Language | English | | Review criteria | Ground-breaking nature, Methodology, PI track record | | Cultural norms | Emphasis on "high-risk/high-gain", methodology table with WP/deliverables/milestones, Gantt chart expected, strong PI narrative |
DFG (Germany — Deutsche Forschungsgemeinschaft)
| Field | Detail | |-------|--------| | Sections | State of the Art, Objectives, Work Programme, Bibliography, CV | | Language | English or German | | Review criteria | Scientific quality, Originality, Feasibility, PI qualification |
SNSF (Switzerland — Swiss National Science Foundation)
| Field | Detail | |-------|--------| | Sections | Summary, Research Plan, Timetable, Budget | | Language | English | | Review criteria | Scientific relevance, Originality, Feasibility, Track record |
ARC (Australia — Australian Research Council)
| Field | Detail | |-------|--------| | Sections | Project Description, Feasibility, Benefit, Budget | | Language | English | | Review criteria | Research quality, Feasibility, Benefit to Australia |
NWO (Netherlands — Dutch Research Council)
| Field | Detail | |-------|--------| | Sections | Summary, Proposed Research, Knowledge Utilisation | | Language | English | | Review criteria | Scientific quality, Innovative character, Knowledge utilisation |
GENERIC
For any grant not listed above. User provides section names, page limits, and review criteria via argument:
/grant-proposal "topic — GENERIC, sections: Background|Methods|Impact, language: English"
State Persistence (Compact Recovery)
Grant proposal drafting is a long task that may trigger context compaction. Persist state to grant-proposal/GRANT_STATE.json after each phase:
{
"phase": 2,
"grant_type": "KAKENHI",
"grant_subtype": "Start-up",
"language": "Japanese",
"codex_thread_id": "019cfcf4-...",
"gap_statement": "...",
"aims_count": 3,
"status": "in_progress",
"timestamp": "2026-03-18T15:00:00"
}
Write this file at the end of every phase. On invocation, check for this file:
- If absent or
status: "completed"→ fresh start - If
status: "in_progress"and within 24h → resume from saved phase (readGRANT_PROPOSAL.mdandGRANT_REVIEW.mdto restore context) - If older than 24h → fresh start (stale state)
On completion, set "status": "completed".
Workflow
Phase 0: Input Parsing & Context Gathering
Parse $ARGUMENTS to extract:
- Research direction/idea — may reference existing files or be a freeform description
- Grant type — detect from keywords (e.g., "科研費"→KAKENHI, "NSF"→NSF, "国自然"→NSFC, "基金"→NSFC)
- Grant sub-type — detect from keywords (e.g., "Start-up", "若手", "青年", "CAREER", "优青", "海外优青")
- Overrides — output format, language, review rounds
Then gather context from the project directory:
- Read
idea-stage/IDEA_REPORT.mdif it exists (from/idea-discovery); fall back to./IDEA_REPORT.mdif not found - Read
refine-logs/FINAL_PROPOSAL.mdif it exists (from/research-refine) - Read
refine-logs/EXPERIMENT_PLAN.mdif it exists (from/experiment-plan) - Read
review-stage/AUTO_REVIEW.mdif it exists (from/auto-review-loop— prior review feedback is gold for grants); fall back to./AUTO_REVIEW.mdif not found - Read
NARRATIVE_REPORT.mdorSTORY.mdif they exist - Read any existing literature notes or survey documents
- Scan for the user's publication list (e.g.,
publications.md,cv.md,bio.md,CV.pdf) - Check for
grant-proposal/GRANT_STATE.json(resume from prior interrupted run)
If insufficient context exists:
- No research idea at all → suggest running
/idea-discoveryfirst - No literature survey → will invoke
/research-litinline in Phase 1 - No publication list → leave PI qualification section with
[TODO: Add publications]placeholders - Has review-stage/AUTO_REVIEW.md → extract reviewer feedback and use it to strengthen the feasibility narrative
Phase 1: Literature & Landscape Positioning
Invoke /research-lit to ground the proposal in real literature, then search for competing funded projects:
/research-lit "$ARGUMENTS"
What this does:
- Reuse existing surveys if
/research-litwas already run and notes exist - Otherwise invoke
/research-litfor multi-source literature search (arXiv, Scholar, Zotero, local PDFs) - Search for funded projects in the same area via WebSearch:
- KAKENHI → KAKEN database (https://kaken.nii.ac.jp/)
- NSF → NSF Award Search (https://www.nsf.gov/awardsearch/)
- NSFC → NSFC funded projects
- Other agencies → general web search
- Identify competing groups and their recent publications
- Run
/novelty-checkon the proposed research direction to verify the gap is real:
`` /novelty-check "[proposed gap statement]" ``
- Build the gap statement — the single most important sentence in the proposal:
`` "Despite progress in [X], [specific gap] remains unaddressed because [reason]. This proposal addresses this by [approach], which will [expected impact]." ``
🚦 Checkpoint: Present the landscape summary and gap statement to the user:
📚 Literature & landscape analysis complete:
- [key findings from literature]
- [competing funded projects found]
- Gap statement: "[the gap statement]"
Does this accurately capture the positioning? Should I adjust before designing the proposal structure?
⛔ STOP HERE and wait for user response. Do NOT auto-proceed unless AUTO_PROCEED=true was explicitly set by the user.
Options for the user:
- Reply "go" or "ok" → proceed to Phase 2 with current positioning
- Reply with adjustments (e.g., "focus more on X", "the gap should emphasize Y") → refine and re-present
- Reply "stop" → end the skill, save current progress to
grant-proposal/DRAFT_NOTES.md
State: Write GRANT_STATE.json with phase: 1 and the gap statement.
Phase 2: Narrative Structure & Aims Design
Design the proposal's logical architecture before writing any prose.
2.1 Define Specific Aims (2-4)
Each aim must satisfy:
- Independently valuable — if one aim fails, others still produce publishable results
- Logically connected — Aim 1 enables Aim 2, Aim 2 informs Aim 3
- Concrete deliverables — each aim maps to specific outputs (papers, datasets, tools, benchmarks)
- Feasible within budget and timeline
2.2 Build Claims-Aims-Evidence Matrix
| Aim | Key Claim | Preliminary Evidence | Proposed Validation | Risk Level | Deliverable |
|-----|-----------|---------------------|--------------------|-----------:|-------------|
| Aim 1 | [claim] | [pilot data, prior work] | [experiments] | LOW | [paper, dataset] |
| Aim 2 | [claim] | [theoretical basis] | [experiments] | MEDIUM | [paper, tool] |
2.3 Design the Narrative Arc
Grant proposals follow a fundamentally different arc from papers:
Problem → Why Now → What We Propose → Why It Will Work → What We Will Deliver
(not: Problem → Method → Results → Implications)
- Problem: What gap exists and why it matters (scientific + societal)
- Why Now: What recent developments make this the right time (new data, new methods, new need)
- What We Propose:
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: wanshuiyin
- Source: wanshuiyin/Auto-claude-code-research-in-sleep
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.