Not in the top 1,000 by GitHub stars

Thomaszhou22/self-refine-skill

Systematic self-reflection for AI agents. GENERATE → CRITIQUE → REFINE → CHECK. Based on peer-reviewed research. Zero API cost. Works with Claude Code, Cursor, Copilot, Codex CLI, and 10+ more platforms.

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Network or broad shell → After Network or broad shell

225fc93410e6 → 225fc93410e6

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Network or broad shell

First observation → 225fc93410e6

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit 225fc93410e6905573052744dcf53f05625aa63b

git clone --filter=blob:none --no-checkout https://github.com/Thomaszhou22/self-refine-skill.git .hotskills/thomaszhou22-self-refine-skill && git -C .hotskills/thomaszhou22-self-refine-skill checkout --detach 225fc93410e6905573052744dcf53f05625aa63b # Copy each selected skill directory from .hotskills/thomaszhou22-self-refine-skill into .claude/skills/<skill-name>/
git clone --filter=blob:none --no-checkout https://github.com/Thomaszhou22/self-refine-skill.git .hotskills/thomaszhou22-self-refine-skill && git -C .hotskills/thomaszhou22-self-refine-skill checkout --detach 225fc93410e6905573052744dcf53f05625aa63b # Copy each selected skill directory from .hotskills/thomaszhou22-self-refine-skill into .gemini/skills/<skill-name>/
12GitHub stars
1star in 7 days
1skill in this repository
2commits in 30 days

Heat

2.7
  • Star growth, last 7 daysNot available
  • Star growth, last 24 hoursNot available
  • Rank movement, last 7 daysNot available
  • Commits, last 30 daysNot available
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekNot available

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Oct 25, 2026Nov 5, 202612

30-day change not yet available: not enough history.

Individual skills in this repository

How it works

self-refine-reflection

When your agent uses it

Systematic self-reflection and iterative output refinement for AI agents. Based on Madaan et al. (2023) Self-Refine, Shinn et al. (2023) Reflexion, and Andrew Ng's Reflection pattern. Use when outputs need multi-round critique-and-improve cycles, when initial quality is insufficient, or when complex tasks benefit from self-correction.

What it loads into context

Frontmatter

108 tokens

Always available to the agent

SKILL.md

2,571 tokens

When the skill is activated

Reference documents

16,194 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. Platform Auto-Detection
  2. Inline Reflection Templates (for environments without file access)
  3. When to Activate
  4. Core Loop: GENERATE → CRITIQUE → REFINE → CHECK
  5. Reflection Dimensions
  6. Reflection Depth Levels
  7. Convergence Rules
  8. Cost Control Strategy
  9. Trigger Conditions Summary
  10. Output Format
  11. Reflexion Memory (Cross-Session Learning)
  12. Relationship to Other Reflection Techniques
  13. Quick Reference Card

Files

  • .claude-plugin/.claude-plugin/marketplace.jsonasset631 bytes
  • .claude-plugin/.claude-plugin/plugin.jsonasset458 bytes
  • .claude-plugin/marketplace.jsonasset631 bytes
  • .claude-plugin/plugin.jsonasset458 bytes
  • .github/ISSUE_TEMPLATE/bug_report.mddoc437 bytes
  • .github/ISSUE_TEMPLATE/feature_request.mddoc406 bytes
  • .github/PULL_REQUEST_TEMPLATE.mddoc451 bytes
  • .gitignoreasset40 bytes
  • BENCHMARK.mddoc36,616 bytes
  • CHANGELOG.mddoc1,588 bytes
  • CLAUDE.mddoc227 bytes
  • CONTRIBUTING.mddoc1,574 bytes
  • GEMINI.mddoc157 bytes
  • LICENSEasset1,068 bytes
  • README.mddoc11,998 bytes
  • SKILL.mdcore10,809 bytes
  • references/reflection-templates.mddoc3,557 bytes
  • references/sources.mddoc2,927 bytes
Read SKILL.md

# Self-Refine Reflection Skill

> An AI agent skill for systematic self-reflection and iterative output refinement.
> Based on Madaan et al. (2023), Shinn et al. (2023), and Andrew Ng's Reflection design pattern.

## Platform Auto-Detection

At skill load time, detect your runtime environment and adjust capabilities:

| Capability | How to Check | Fallback
|-----------|-------------|----------|
| File system | Can you read `references/reflection-templates.md`? | Use the inline templates below instead
| Persistent memory | Can you write to `memory/`? | Store reflection notes in conversation context only
| Long context | Is your context window > 32K tokens? | Cap at Level 2 (skip adversarial review)
View the complete source on GitHub

Skills included

  • self-refine-reflection

Repository facts

License
MIT
Created
May 19, 2026
Last pushed
Nov 3, 2026
Forks
0
Open issues
0
Project activity
Active

Before you install

Network or broad shell

Automated signals, not a guarantee

Checked Nov 4, 2026

Show all 60 signals by file

.claude-plugin/.claude-plugin/plugin.json

  • Network accessline 6
    "name": "Thomas Zhou"   },   "homepage": "https://github.com/Thomaszhou22/self-refine-skill",
  • Network accessline 7
    },   "homepage": "https://github.com/Thomaszhou22/self-refine-skill",   "repository": "https://github.com/Thomaszhou22/self-refine-skill",
  • Network accessline 8
    "homepage": "https://github.com/Thomaszhou22/self-refine-skill",
  • Network accessline 9
    "repository": "https://github.com/Thomaszhou22/self-refine-skill",

.claude-plugin/plugin.json

  • Network accessline 6
    "name": "Thomas Zhou"   },   "homepage": "https://github.com/Thomaszhou22/self-refine-skill",
  • Network accessline 7
    },   "homepage": "https://github.com/Thomaszhou22/self-refine-skill",   "repository": "https://github.com/Thomaszhou22/self-refine-skill",
  • Network accessline 8
    "homepage": "https://github.com/Thomaszhou22/self-refine-skill",
  • Network accessline 9
    "repository": "https://github.com/Thomaszhou22/self-refine-skill",

.gitignore

  • Access to secretsline 4
    [Credential-related source omitted]

BENCHMARK.md

  • Network accessline 309
    > ```jsx > // ❌ Triggers loop: { page: 1 } !== { page: 1 } > useEffect(() => { fetch(filters); }, [filters]);
  • Network accessline 310
    > // ❌ Triggers loop: { page: 1 } !== { page: 1 } > useEffect(() => { fetch(filters); }, [filters]); >
  • Network accessline 311
    > useEffect(() => { fetch(filters); }, [filters]);
  • Network accessline 312
    >  > // ✅ Use primitive deps > useEffect(() => { fetch(filters); }, [filters.page, filters.sort]);
  • Network accessline 313
    > // ✅ Use primitive deps > useEffect(() => { fetch(filters); }, [filters.page, filters.sort]); > ```
  • Network accessline 314
    > useEffect(() => { fetch(filters); }, [filters.page, filters.sort]);
  • Network accessline 690
    >   listen 80; >   location / { >     proxy_pass http://localhost:3000;
  • Network accessline 691
    >   location / { >     proxy_pass http://localhost:3000; >   }
  • Network accessline 692
    >     proxy_pass http://localhost:3000;
  • Network accessline 703
    >     listen 80; >     server_name example.com; >     return 301 https://$host$request_uri;  # force HTTPS
  • Network accessline 704
    >     server_name example.com; >     return 301 https://$host$request_uri;  # force HTTPS > }
  • Network accessline 705
    >     return 301 https://$host$request_uri;  # force HTTPS
  • Network accessline 714
    >  >     location / { >         proxy_pass http://127.0.0.1:3000;
  • Network accessline 715
    >     location / { >         proxy_pass http://127.0.0.1:3000; >         proxy_http_version 1.1;
  • Network accessline 716
    >         proxy_pass http://127.0.0.1:3000;
  • Dangerous shell operationline 727
    > **Key:** The `X-Forwarded-*` headers let your Node app know the real client IP and protocol. Without them, `req.ip` is `127.0.0.1`. SSL via certbot: `sudo certbot --nginx -d example.com`.

CONTRIBUTING.md

  • Network accessline 9
    - Open an [Issue](https://github.com/Thomaszhou22/self-refine-skill/issues)

README.md

  • Network accessline 9
    [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
  • Network accessline 10
    [![OpenClaw](https://img.shields.io/badge/OpenClaw-compatible-blue)](https://openclaw.ai)
  • Network accessline 11
    [![Claude Code](https://img.shields.io/badge/Claude%20Code-compatible-purple)](https://claude.ai)
  • Network accessline 12
    [![Cursor](https://img.shields.io/badge/Cursor-compatible-orange)](https://cursor.sh)
  • Network accessline 13
    [![GitHub Copilot](https://img.shields.io/badge/Copilot-compatible-lightblue)](https://github.com/features/copilot)
  • Network accessline 14
    [![Codex CLI](https://img.shields.io/badge/Codex%20CLI-compatible-green)](https://github.com/openai/codex)
  • Network accessline 15
    [![Gemini CLI](https://img.shields.io/badge/Gemini%20CLI-compatible-4285F4)](https://ai.google.dev)
  • Network accessline 16
    [![Windsurf](https://img.shields.io/badge/Windsurf-compatible-00D4AA)](https://codeium.com/windsurf)
  • Network accessline 17
    [![JetBrains](https://img.shields.io/badge/JetBrains-compatible-000)](https://www.jetbrains.com/ai/)
  • Network accessline 18
    [![Benchmarked](https://img.shields.io/badge/benchmarked-21%25%20improvement-green)](BENCHMARK.md)

references/sources.md

  • Network accessline 6
    - **Authors:** Madaan, Tandon, Gupta, Hallinan, Gao, Wiegreffe, Alon, Dziri, Prabhumoye, Yang, Gupta, Majumder, Hermann, Welleck, Yazdanbakhsh, Clark - **Year:** 2023 - **URL:** https://arxiv.org/abs/2303.17651
  • Network accessline 7
    - **Year:** 2023 - **URL:** https://arxiv.org/abs/2303.17651 - **Code:** https://github.com/madaan/self-refine
  • Network accessline 8
    - **URL:** https://arxiv.org/abs/2303.17651
  • Network accessline 9
    - **Code:** https://github.com/madaan/self-refine
  • Network accessline 14
    - **Authors:** Shinn, Labash, Narasimhan - **Year:** 2023 (NeurIPS) - **URL:** https://arxiv.org/abs/2303.11366
  • Network accessline 15
    - **Year:** 2023 (NeurIPS) - **URL:** https://arxiv.org/abs/2303.11366 - **Code:** https://github.com/noahshinn/reflexion
  • Network accessline 16
    - **URL:** https://arxiv.org/abs/2303.11366
  • Network accessline 17
    - **Code:** https://github.com/noahshinn/reflexion
  • Network accessline 22
    - **Authors:** Dhuliawala, Kordi, Khashabi, Schubotz, Azer, Gurevych - **Year:** 2023 - **URL:** https://arxiv.org/abs/2309.11495
  • Network accessline 23
    - **Year:** 2023 - **URL:** https://arxiv.org/abs/2309.11495 - **What we use:** Verification question pattern for factual claims in Level 2-3 reviews.
  • Network accessline 24
    - **URL:** https://arxiv.org/abs/2309.11495
  • Network accessline 28
    - **Authors:** Kadavath et al. - **Year:** 2022 - **URL:** https://arxiv.org/abs/2207.05221
  • Network accessline 29
    - **Year:** 2022 - **URL:** https://arxiv.org/abs/2207.05221 - **What we use:** Self-calibration — models can assess their own confidence.
  • Network accessline 30
    - **URL:** https://arxiv.org/abs/2207.05221
  • Network accessline 49
    - **Authors:** Wang et al. - **Year:** 2022 - **URL:** https://arxiv.org/abs/2203.11171
  • Network accessline 51
    - **URL:** https://arxiv.org/abs/2203.11171
  • Network accessline 54
    - **Authors:** Yao et al. - **Year:** 2023 - **URL:** https://arxiv.org/abs/2305.10601
  • Network accessline 56
    - **URL:** https://arxiv.org/abs/2305.10601
  • Network accessline 59
    - **Authors:** Zhang et al. - **Year:** 2023 - **URL:** https://arxiv.org/abs/2308.04371
  • Network accessline 61
    - **URL:** https://arxiv.org/abs/2308.04371
  • Network accessline 65
    ### Learn Prompting — Self-Criticism Section - **URL:** https://learnprompting.org/docs/advanced/self_criticism/introduction
  • Network accessline 66
    - **URL:** https://learnprompting.org/docs/advanced/self_criticism/introduction
  • Network accessline 69
    ### Self-Refine Demo Site - **URL:** https://selfrefine.info/
  • Network accessline 70
    - **URL:** https://selfrefine.info/

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Some files could not be read; the facts below still hold.

Signal confidence: 51 facts

and 1 more

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeNativeManifest .claude-plugin/.claude-plugin/plugin.json.claude/skills/<skill-name>/
CodexCompatibleStandard SKILL.md SKILL.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md SKILL.md.cursor/skills/<skill-name>/
Gemini CLINativePath GEMINI.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.