agentleFS
Sathvikar01Sathvikar01/Agent-engineering-skills/prompt-engineering/SKILL.md

prompt-engineering

Skill3 starsChanged 38 days agoMITView on GitHub

Design concise, versioned production prompts with responsibilities, trust boundaries and measurable behavior. Use when building or revising deployed agent/workflow prompts, defining instruction hierarchy, tool/output guidance, uncertainty or termination, or evaluating a prompt regression. Do not use for generic prompt tricks, one-off prose requests, repository context setup, or using a prompt as authorization/security enforcement.

85 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-checklist, multi-agent-orchestration and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • atuljha23Skill

    security-checklist

    OWASP-style quick reference — authn/authz, injection, secrets, sessions, crypto, dependencies. Use during code review and before committing security-sensitive changes.

    Also in 3 projects that use this

  • javalenciacaiSkill

    multi-agent-orchestration

    Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.

    Also in 4 projects that use this

  • xfstudioSkill

    llm-evaluation

    Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

    Also in 3 projects that use this

  • GoogleSkill

    coding-principles

    Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.

    Also in 3 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 6 projects that use this

  • LangChainSkill

    web-research

    Use this skill for requests related to web research; it provides a structured approach to conducting comprehensive web research

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 75 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat a production prompt as a versioned interface to a bounded reasoning component.

    line 12
  2. Distinctive:

    Place stable instructions and current task-critical context deliberately.

    line 20

“Common” is measured: kept by at least 6 in 10 of the 75 edited versions of this file we could read. “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

Prompt Engineering

Treat a production prompt as a versioned interface to a bounded reasoning component. It cannot confer permissions or enforce a security boundary.

Define and minimize the contract

  1. Identify the model's responsibilities, inputs, observable outputs and failure/abstention behavior. Assign calculations, permissions, state transitions and budgets to deterministic code. Remove tasks the model is being asked to guess despite available authoritative data.
  2. Separate instruction hierarchy from untrusted content. Put stable role/responsibilities and boundaries in trusted instructions, current task and relevant evidence in clear sections, and source data in labeled containers with provenance. Follow the actual provider/harness hierarchy; do not let a quoted document redefine it.
  3. State scope, forbidden assumptions, tool choice/preconditions, output contract, evidence requirements and stop conditions in short concrete rules. Reference authoritative schema/tool definitions instead of pasting conflicting copies. Tell the model what to do when facts, access or required evidence are absent: construct a supported candidate or retrieve a missing fact within budget, then validate; otherwise abstain, return a typed gap or request a meaningful clarification. Do not default to refusal when a safe valid candidate can be established.
  4. Include few-shot examples only for ambiguous decisions or recurrent errors. Cover safe refusal/insufficient evidence when useful, but keep examples distinct from held-out evals. Do not add examples that teach fabricated IDs or approval from confidence.
  5. Place stable instructions and current task-critical context deliberately; bound retrieved material and remove stale or irrelevant instructions. Test placement rather than assuming every model handles long context identically. Summarization preserves source attribution and uncertainty; it cannot create authority.

Evaluate changes as code changes

  1. Save prompt version/hash, model/sampling, schema/tool versions and context-assembly version. Externalize dynamic data rather than baking customer/project facts into a global prompt. Make prompt rollbacks possible without incompatible state/schema changes.
  2. Freeze representative cases and a baseline before changing the prompt. Test normal tasks, ambiguity, missing evidence, poisoned documents, refusal, unsupported actions, output validation and termination. Judge observable output/calls against deterministic assertions and a calibrated semantic rubric where needed.
  3. Change one responsibility or example at a time; run paired comparisons and repeated stochastic cases. Retain improvements that beat baseline noise without violating safety, latency or cost gates. A longer defensive prompt is not a substitute for enforced constraints.
  4. Trace failures to instruction conflict, absent context, schema mismatch, tool affordance or capability limits before adding more wording. Delete redundant/contradictory clauses and unhelpful examples. Resolve semantic policy ambiguity in software/specification, not by telling the model to improvise.

Deliver the prompt artifact, responsibility/trust table, version metadata, eval cases and measured comparison/rollback decision. Example rule: “Use only returned resource IDs; if evidence is missing, return insufficient_evidence.” The executor still checks IDs and authority.

Coding-session context is out of scope (a context-engineering skill may cover it); this skill governs model instructions shipped as part of a product. Use structured-output-design for schemas and agent-evals for measurement; neither requires a giant prompt.

State that model output is a fallible proposal. Returned evidence IDs must describe support actually used for decisions/claims, not every retrieved item. Natural-language explanation must agree with the structured decision and supported facts. Test contradictory explanations and fabricated/irrelevant IDs. Prompts request these behaviors; executable reconciliation and admission enforce decidable constraints.

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.