Prompt Sensei skill

A local prompt coach for Claude Code and Codex: scores a prompt by work stage, rewrites it and suggests one habit to practise.

  • 109 ★ on the repository
  • Last commit
  • Apache-2.0
Skill

Extended access

Why this level

  • Optional hooks read session events, and `lookback` reads local Claude Code and Codex history after consent.
  • The skill writes metadata to `~/.prompt-sensei/`.
All reasons and checks

chengzhongwei/prompt-sensei

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/prompt-sensei

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Optional hooks read session events, and `lookback` reads local Claude Code and Codex history after consent.
  • The skill writes metadata to `~/.prompt-sensei/`.

This is third-party code. Review the repository files before installing.

What it does

Prompt Sensei is a skill for Claude Code and Codex that acts as a quiet prompt coach. The `/prompt-sensei improve` command rewrites a rough prompt and names what is missing, while `observe` mode appends a short line with a score and a tip to the agent answer. The score depends on the work stage: exploration, diagnosis, execution, verification, reusable workflow or a short action. With separate consent `lookback` analyses local session history, and `report` shows trends. Metadata is stored in `~/.prompt-sensei/`; the skill never stores raw prompts.

Who it is for. Developers who give Claude Code or Codex vague tasks and want to build a habit of writing sharper prompts.

Good fit when

  • A prompt such as "fix this test" gives a vague answer and needs rewriting.
  • During a session you want a tip on every agent answer, so you turn on `observe`.
  • Past sessions are reviewed for habits: which gaps in prompts keep repeating.
  • A team learns to phrase agent prompts against a shared scoring rubric.

Not a fit when

  • Work happens in Cursor or another agent: only Claude Code and Codex are supported.
  • Policy forbids local hooks and writes to the home directory.
  • An objective prompt quality grade is needed: the score is only a hint.

Example request

Run `/prompt-sensei improve "fix this test"` and show what the prompt is missing.

Limitations

Claude Code and Codex are supported; Cursor and other tools are not yet. Only Claude Code understands the `/prompt-sensei` command, while Codex takes natural-language requests. Installation needs `npm install` and `npm run build` in the skill directory. Autostart hooks are optional, and Codex asks you to confirm new hook commands before they run. The score is a learning signal and does not guarantee a better result.

How to disable. Run `/prompt-sensei stop` for the current session, remove the autostart hooks from Claude Code or Codex settings and delete the skill directory. `/prompt-sensei clear` wipes local data.

FAQ

Which commands does Prompt Sensei have?

`observe` starts live tips, `improve` rewrites a prompt, `lookback` reviews history, `setup` guides configuration and `help` shows help. There are also `stop`, `report`, `settings`, `update` and `clear`.

What is stored on disk?

Only local metadata in `~/.prompt-sensei/`, and only after your consent. Raw prompts are never stored, and redacted prompt previews are off by default.

How do I use the skill in Codex?

Write in natural language, for example "Use prompt-sensei observe mode". Hook autostart is enabled with `npm run setup-hooks -- auto-observe folder`, and Codex asks you to confirm the hooks on first run.

What does a score of 68 out of 100 mean?

Readiness of the prompt for the current work stage, not universal quality. A 100-point prompt can still produce a weak answer if the model lacks domain knowledge.

Do prompts leave the machine?

No. The local scripts send no prompt text, scores or reports to any service. In `lookback` mode, after separate consent, the agent sees redacted user prompts.

Discussion

No questions or reviews yet.

Skills

RePrompter interviews you about a rough request and turns it into a scored, structured prompt or a build prompt for a project.

SkillExtended access120Repository stars

A hook plugin that adds context to a Claude Code prompt and asks one to six grounded questions when a request is vague.

PluginExtended access2KRepository stars

Independently written prompt templates for AI coding agents: system prompts, tool prompts, delegation, memory and multi-agent coordination

PromptMinimal access1.2KRepository stars

A skill that writes precise prompts tailored to a specific tool: Cursor, Claude Code, Midjourney, Stable Diffusion and more

SkillMinimal access15.9KRepository stars

A plugin with six working skills and a prompt library: routing a task to a prompt, pre-commit checks and skill audits.

PluginExtended access56Repository stars

A skill that scores a prompt on five criteria, picks one of 31 frameworks and rewrites the request after clarifying questions

SkillMinimal access333Repository stars

README in short

The repository holds a scoring rubric, privacy and philosophy documents, example hooks for Claude Code and Codex and TypeScript scripts. A separate section explains how to check the benefit: fewer clarification turns and surprising edits.

README badge

Original SKILL.md

---
name: prompt-sensei
description: Stage-aware prompt coaching, prompt improvement, lookback analysis, prompting habit feedback, and local reports about prompt quality for AI coding agents such as Claude Code or Codex.
argument-hint: "[observe|improve|lookback|setup|help]"
---

# Prompt Sensei

Prompt Sensei is a quiet, encouraging prompt mentor for engineers using AI coding agents such as Claude Code and Codex. Be a teacher, not a judge. Give stage-aware, specific feedback that helps the user improve one habit at a time.

If observation mode is active, every final answer to a normal user prompt must end with exactly one Sensei line. Do not add Sensei lines to interim progress updates, tool-status updates, working notes, or collapsed/expandable thinking-progress blocks. Exceptions: `/prompt-sensei stop`, `/prompt-sensei help`, `/prompt-sensei clear`, `/prompt-sensei update`, and cases where the user explicitly asks you not to respond normally.

## Invocation

Essential commands:

- `/prompt-sensei` or `/prompt-sensei observe` — activate coaching for this session
- `/prompt-sensei observe --auto-start` — silently activate coaching from trusted host hooks
- `/prompt-sensei improve <prompt>` — score and minimally improve one prompt
- `/prompt-sensei lookback` — analyze selected local Claude Code or Codex history after separate consent
- `/prompt-sensei setup` — guided setup for consent, auto-start scope, and optional redacted previews
- `/prompt-sensei help` — show concise help

Advanced commands:

- `/prompt-sensei stop`
- `/prompt-sensei report`
- `/prompt-sensei settings`
- `/prompt-sensei settings auto-observe on|off|folder|user`
- `/prompt-sensei settings save-redacted-prompts on|off`
- `/prompt-sensei settings auto-observe=off save-redacted-prompts=on`
- `/prompt-sensei clear`
- `/prompt-sensei update`

Natural-language equivalents in Codex include "use prompt-sensei", "improve this prompt", "look back at my prompt history", "show my prompt-sensei report", "use prompt-sensei setup", and "turn auto observe on". Settings commands accept friendly values such as `enable/disable`, `true/false`, and aliases such as `redacted`, `previews`, and `auto-start`.

When running scripts, use the installed skill root:

- Claude Code: `~/.claude/skills/prompt-sensei`
- Codex: `~/.codex/skills/prompt-sensei`

For setup, settings, hooks, and lookback details, read [docs/skill-flows.md](docs/skill-flows.md) only when that mode is requested.

## Stages

Report a problem