agentleFS
MK27MKMK27MK/no-bs-skills/skills/answer-as-type/SKILL.md

answer-as-type

Skill13 starsChanged 51 days agoMITView on GitHub

Answer as a return value, not as prose.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No preamble, no restatement of the question, no reasoning, no caveat, no unit, no trailing sentence, no word about the check.

    line 13
  2. Distinctive:

    IF the answer needs work first (read files, run a command, count something), THEN do the work with tools, and return only the value.

    line 17
  3. Very specific:

    IF $type is one of the types in the table below, THEN type is $type, and the rest of the request is the question.

    line 18
  4. Very specific:

    IF $type is not one of those types, THEN type is not set, and the whole request is the question.

    line 19
  5. Very specific:

    IF type is set, THEN it is the return annotation of the function, and it is final.

    line 20
  6. Very specific:

    IF type is not set, THEN infer it from the question, using the table below.

    line 21
  7. Very specific:

    IF the value cannot be computed, THEN return None and nothing else.

    line 22
  8. Distinctive:

    NEVER wrap the value in a code fence unless the value is itself code.

    line 40
  9. Distinctive:

    ALWAYS run the check, even when the value looks obvious.

    line 44
  10. Very specific:

    Run check-value.py from this skill's folder.

    line 46
  11. Distinctive:

    IF the user then asks why, or how, THEN explain in one or two sentences.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Func

The user called a function. Return its value. Nothing else.

No preamble, no restatement of the question, no reasoning, no caveat, no unit, no trailing sentence, no word about the check.

The first word of the request is $type.

  • IF the answer needs work first (read files, run a command, count something), THEN do the work with tools, and return only the value.
  • IF $type is one of the types in the table below, THEN type is $type, and the rest of the request is the question. The word is the type, not a verb: list means a numbered list, set a bullet list.
  • IF $type is not one of those types, THEN type is not set, and the whole request is the question.
  • IF type is set, THEN it is the return annotation of the function, and it is final. NEVER swap it for the type you would infer, even when the question reads like another type. Convert the answer into it, using the table below.
  • IF type is not set, THEN infer it from the question, using the table below.
  • IF the value cannot be computed, THEN return None and nothing else.

Return types

TypeFormatInfer it when the question asks forConvert into it, when the question asks for something else
booltrue or falseyes/no, is/are, does/do, can/shouldwhether any such thing exists
intbare digits: 5how many, count, index, line numberhow many things answer the question
floatbare decimal: 0.42ratio, percentage, average, durationthe number that answers it, as a decimal
strthe bare string, no quotesa name, a path, a command, a single valuethe answer on one line
listnumbered markdown liststeps, an ordered procedure, a rankingthe items, numbered, even when their order carries no meaning
setbullet markdown listitems where order carries no meaningthe items, bulleted, even when they have an order
  • bool is true/false, never Yes/No.
  • int and float carry no unit, no thousands separator, no words. 5, not 5 sub-agents.
  • float keeps the precision the question implies. Do not pad zeros.
  • list and set items are values too: each one is short and bare, with no explanation attached.
  • Order matters in a list and never in a set. IF type is not set and you are unsure which, THEN return a set.
  • NEVER wrap the value in a code fence unless the value is itself code.

The check

ALWAYS run the check, even when the value looks obvious. Your last tool call before you reply is the check, on the exact reply you are about to send.

Run check-value.py from this skill's folder. Give it the value on stdin, and the whole request of the user, type word included, as --question. The script reads the type from the request: the named type when there is one, the inferred type otherwise.

printf '%s' "$VALUE" | python3 <skill-folder>/check-value.py --question "$ARGUMENTS"

Exit 0 means the format holds. Exit 1 prints one finding per line. IF the script exits 1, THEN rewrite the value and run it again. Deliver only a value that exits 0, and say nothing about the check.

The script reads the format, not the truth. It cannot tell you that the value is correct.

Examples

Q: did you edit any file outside src/?

false

Q: /func int how many sub-agents did you spawn during the session?

5

Q: which kind of return values does this skill implement?

- bool
- int
- float
- str
- list
- set

Q: how do I release a new version?

1. Bump the version in `pyproject.toml`.
2. Run `uv build`.
3. Tag the commit.
4. Push the tag.

The follow-up

IF the user then asks why, or how, THEN explain in one or two sentences. Give the fact that produced the value. Do not repeat the value.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.