product-on-purpose/writing-style-catalog/entry-recommender
Claude Code and agent skill by product-on-purpose/writing-style-catalog
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Recommend a voice, tone, style, and format combination from the catalog's shipped (non-draft) entries for a described writing situation, then compose the prompt in the same step. Accepts optional pre-fixed axis values; never recommends draft entries; reports low confidence rather than force-picking when nothing fits.
Install
npx vskill@latest install product-on-purpose/writing-style-catalog/entry-recommenderSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as product-on-purpose/writing-style-catalog/entry-recommender.
Entry Recommender
Take a described writing situation and recommend a voice/tone/style/format combination from the catalog's shipped (non-draft) entries, with a defensible reason per axis quoting the entry's own language, then compose the final prompt in the same step. This is the fast interactive path for a user who does not yet know which of the 97 shipped entries (52 of them Format) fits their situation - writing-instruction-builder composes from axis values you already know you want; this skill finds them first.
Full spec: docs/internal/entry-recommender-spec.md. Implementation plan (this file implements Phases 3-6; Phases 1-2 are scripts/recommend.py): docs/internal/release-plans/entry-recommender-implementation-plan.md.
Prerequisites
- The
writing-style-catalogplugin is present:taxonomy/(the entries),skills/entry-recommender/scripts/recommend.py(the scorer), andskills/writing-instruction-builder/scripts/build-instruction.py(the composer, reused here rather than reimplemented) all exist at the plugin root. - If a prerequisite is missing, say so and stop. Do not invent entries, scores, or field language.
Usage
The situation description is free text - what you need to write and for whom. Any axis=id tokens in the input are pre-fixed axis values; strip them out. Everything else in the input is the situation description, and it reaches the script only through Step 1's temp-file mechanism - never as a --situation shell argument (that is Step 1's first failure mode).
voice=,tone=,style=,format=- optional. An axis with a fixed value is never recommended, re-justified, or second-guessed (AC-2).--recommend-only- optional. Suppresses composition; returns just the four picks, justifications, and any conflict/low-confidence notes, for a user who wants to review before composing (AC-5).
The Process
Order is load-bearing: score before reading full fields (Step 1 before Step 2), pick before conflict-checking (Step 2 before Step 3), resolve before composing (Step 3 before Step 4).
Step 1 - Score the candidate pool. The situation description is arbitrary user text - it can and will contain quotes, apostrophes, backslashes, or newlines ("explaining my team's Q3 numbers" already has one) - and it can be sensitive (HR matters, incident details, customer or product information). Four failure modes to avoid, not one, two, or three:
- Never build a shell command by embedding that text directly into a
--situation "..."string - real command injection, not theoretical; an ordinary apostrophe is enough to break it with no ill intent. - Never hand-substitute it into a JSON template without properly escaping it first ("explaining why \"quality\" matters" breaks
{"situation": "<text>"}the instant you paste it in unescaped - confirmed, this produces invalid JSON from completely ordinary text, no attacker required). - Never pipe it through a shell heredoc, even a quoted one - the delimiter that closes a heredoc is plain text matched against the body; if the situation text itself contains that exact line (a fixed, predictable delimiter is guessable by anyone who has read this file, since it is public), the heredoc ends early and whatever follows is interpreted as a new, separate shell command, silently reintroducing the exact injection this is supposed to prevent. The script's
--stdinflag is this same trap by another name when fed via a heredoc or here-string - do not use--stdinfor situation text either. - Never rely on yourself to remember a separate delete-the-file step afterward as the only cleanup - if this run is interrupted, errors out earlier than expected, or the step is simply skipped, sensitive situation text is left sitting on disk. Use
--ephemeral-input-file(below), which deletes the file as part of the script's own execution, not as a separate instruction you have to remember and successfully reach.
Do all of this correctly, in order:
- Apply real JSON string escaping to the situation text (and to
topic/audienceif given): replace\with\\,"with\", newline with\n, carriage return with\r, tab with\t. This is a mechanical, well-defined transformation, not a judgment call - do not skip it or assume the text happens to be simple enough not to need it. - Use the Write tool (never a shell command,
echo, or heredoc) to write the escaped JSON payload to a new file. The location MUST be inside the OS/system temp directory specifically (Python'stempfile.gettempdir()- on this session, that is the same root your scratchpad directory is nested under) - NOT merely "somewhere that feels temporary," and NEVER inside this project's working directory. Step 3's flag checks this exact condition and refuses to touch (read OR delete) a path outside it, so if you write somewhere else, the file will be left behind with an error telling you to delete it yourself - avoid that by writing to the right place the first time. The filename MUST end in.entry-recommender-input.json(any prefix is fine, for examplesituation-<something>.entry-recommender-input.json) - Step 3's flag also refuses to touch a file that is not named this way, on purpose, so a path mistake fails loudly instead of silently deleting the wrong file:
``json {"situation": "<the escaped situation text>", "voice": "<id, if fixed>", "tone": "<id, if fixed>"} ``
Omit any key for an axis that is not fixed. The Write tool writes file content directly - it does not involve a shell at all, so nothing here is a quoting or injection concern; the only remaining requirement is that the JSON string itself is valid, which step 1 above ensures.
- Run the scorer against that file with
--ephemeral-input-file, not--input-file- the path is short, assistant-chosen, and safe to put in a shell command, unlike the situation text itself. This flag deletes the file itself, guaranteed, as soon as it has been read (you do not need a separate cleanup step, and the file is gone even if the JSON turns out to be malformed or scoring fails), but only if the path is outside this repo, inside the system temp directory, AND correctly named per step 2 - otherwise it raises an error instead of reading or deleting anything:
``bash python "${CLAUDE_SKILL_DIR}/scripts/recommend.py" --ephemeral-input-file <path-to-the-temp-file> --json ``
This returns, per non-fixed axis, a tiered short_list containing EVERY candidate that clears above_threshold (C1 guarantee - no qualifying candidate is ever hidden). The list has two groups:
- Read tier (first
short_list_sizerows that areabove_threshold: true, default 6): full rows withscore,distinct_matches,matched_tokens,one_liner,when_to_use,tells,when_not_to_use. These are the top qualifying candidates. Step 2 reads and picks from these directly. - Lean rows (everything else - carries
"fields": "fetch"as a sentinel and physically lackswhen_to_use,tells, andwhen_not_to_use): two mutually exclusive sub-groups appear here: - Lean triage (
above_threshold: true, when qualifying count exceedsshort_list_size): qualifying candidates beyond the read tier. You MUST fetch a lean triage row's full fields via--fetch-manybefore it can be picked - never pick from a lean row alone. - Lean padding (
above_threshold: false, when qualifying count is less thanshort_list_size): non-qualifying near-miss rows present for context only. These are NOT pick candidates. Fetch a lean padding row only if you intend to cite it in an AC-7 low-confidence justification (see Step 2 below).
Also: candidate_count, and no full_ranked in default output (use --debug if you need it for score diagnosis - it is not part of the documented workflow). For diagnosing why a score is what it is, --verbose prints a per-candidate trace to stderr: every situation token's IDF weight, each candidate's per-field matches with their weighted contribution, and for a rejected candidate which gate it failed. --debug shows the scores; --verbose shows how they were arrived at. stdout stays clean JSON under both. A fixed axis reports {"fixed": id, "valid": true/false} instead - if valid is false, stop and tell the user the fixed value does not exist in the stable catalog rather than silently ignoring it (Phase 4 Step 3).
From this point on, every id this skill puts into a shell command (in Step 3 and Step 4 below) is either one this step's JSON output already validated (a fixed axis reported valid: true) or one this skill itself picked from short_list (which only ever contains real stable catalog ids, matching the strict kebab-case id pattern every entry is validated against). Never interpolate the raw, not-yet-validated situation text or an unvalidated fixed-axis claim into any later shell command either - route it through Step 1's temp-file mechanism first.
Step 2 - Read, pick, and justify each non-fixed axis (AC-1, AC-3, AC-7). The score decides who makes the short list. It does not decide who wins.
- Read the read-tier candidates (rows carrying full
when_to_use/tells/when_not_to_use) in full. The score is a cheap keyword/facet heuristic - it tells you who is worth reading, not who is right. Compare the WHOLE read tier's language against the situation before picking. Do not default to the top score and use your read only as a rubber stamp. - Triage the lean rows (those carrying
"fields": "fetch"). There are two kinds:
- Lean triage rows (
above_threshold: true): qualifying candidates beyond the read tier. For each, scan itsone_linerandmatched_tokens. A lean triage row whose one_liner or matched tokens look genuinely competitive with the read tier MUST be fetched before it can be picked - never pick from a lean row alone. - Lean padding rows (
above_threshold: false): non-qualifying near-misses. Do not fetch these unless you need to cite one in an AC-7 low-confidence justification (see below). They are not pick candidates and do not need to be triaged.
Fetch lean triage candidates you intend to consider in one call:
``bash python "${CLAUDE_SKILL_DIR}/scripts/recommend.py" --fetch-many <axis> <id> <id> ... --json ``
Typical situations need 0-4 fetches per axis (lean triage rows only). A situation where many lean triage rows look competitive is a signal to re-read the read tier more carefully, not to fetch everything. An axis where the read tier alone already contains a strong fit needs zero fetches - which is the common case.
- Apply the pick rules over everything you have now read in full:
- Also read `when_not_to_use` before picking, not just `when_to_use`/`tells` - a positive-only read is not the full read. Scoring only looks at positive fields, so a candidate can clear the short list on
when_to_use/tellsoverlap while its ownwhen_not_to_useexplicitly names the situation as a poor fit. Treat a genuine match there as disqualifying for that candidate.
- Confirmed repeatedly in testing: the top-scoring candidate is very often not the best actual pick. A lower-scoring candidate can describe the situation almost verbatim while the top score turns out to be pulling in the wrong direction (for example, scoring high on "the reasoning is settled, not relitigated" language when the situation explicitly asks the reader to trust the reasoning) or coincidentally matching a word used in an unrelated sense.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/entry-recommender/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/product-on-purpose/writing-style-catalog/entry-recommender)