pi-prompting
agents365-ai/365-skills
Guidance for composing reliable prompts to Pi (DeepSeek by default) for coding, review, diagnosis, and research.
What is pi-prompting?
Internal skill that provides structured prompt-composition rules for the pi-companion-forwarder agent. Use this when delegating non-trivial coding or investigation tasks to Pi, ensuring prompts follow concrete contracts and grounding rules that both reasoning and non-reasoning models handle reliably.
- Define task scope and output contracts using XML-style tag blocks (<task>, <output_contract>, <grounding_rules>, <action_safety>)
- Bias toward numbered checklists and explicit end-state definitions rather than abstract instructions
- Route multi-workstream tasks to Pi subagents (scout, researcher, planner, worker, reviewer) when pi-subagents is installed
- Distinguish between /pi:review, /pi:adversarial-review, and direct task prompts based on job type
- Anchor claims to observed evidence and mark hypotheses explicitly to prevent unsupported drift
How to install pi-prompting
npx skills add https://github.com/agents365-ai/365-skills --skill pi-prompting- pi-companion-forwarder skill installed and configured
- Pi model configured (defaults to DeepSeek V4; Pro for review, Flash for everyday tasks)
- Optional: pi-subagents skill for multi-workstream task routing
How to use pi-prompting
- 1.Identify the task type: diagnosis, review, research, implementation, or multi-workstream.
- 2.For reviews, use /pi:review or /pi:adversarial-review commands; for others, construct a direct prompt.
- 3.Build the prompt using <task>, <output_contract>, <grounding_rules>, and <action_safety> blocks in order.
- 4.For coding tasks, add <completeness_contract> listing what counts as done (tests pass, lint clean, files touched).
- 5.For research, add <sources> block constraining allowed information sources.
- 6.Send the prompt; for follow-ups on the same session, use --resume-last with only the delta instruction.
- 7.Review Pi's output against the stated contract; if drift occurs, tighten the prompt before escalating effort.
Use cases
- Composing a code-review prompt with explicit grounding rules and file-path context for Pi to audit changes
- Delegating diagnosis of a failing test suite with a completeness contract specifying what counts as resolved
- Routing parallel exploration and implementation workstreams to different Pi subagents in a single prompt
- Requesting research or recommendations with a sources block constraining what Pi may consult
- Sending follow-up instructions via --resume-last to avoid restating the entire prompt context
- Agents (Claude Code, Cursor) that forward tasks to Pi via pi-companion-forwarder
- Teams using Pi for code review, diagnosis, research, or implementation workflows
- Developers who need deterministic, contract-driven prompting to DeepSeek Flash and Pro models
pi-prompting FAQ
Use /pi:review or /pi:adversarial-review when reviewing local git changes; those commands carry the review contract. Use manual task prompts for diagnosis, planning, research, or implementation where you need direct control over the prompt structure.
No. Do not raise reasoning by default — DeepSeek Flash will not benefit, and DeepSeek Pro takes longer. Tighten the prompt contract first; only escalate effort if the prompt is already precise and the task remains difficult.
Use --resume-last and send only the delta instruction instead of restating the whole prompt, unless the direction changed materially.
<grounding_rules> prevents unsupported claims and drift in review, research, or recommendation tasks. It is required whenever Pi could guess at facts not anchored to observed evidence.
No. Never suggest subagents in adversarial-review or stop-review-gate prompts because those need deterministic behavior. Use subagent routing only for tasks with parallel workstreams.
Full instructions (SKILL.md)
Source of truth, from agents365-ai/365-skills.
name: pi-prompting description: Internal guidance for composing prompts that Pi runs (DeepSeek by default) handle reliably for coding, review, diagnosis, and research tasks user-invocable: false
Pi Prompting
Use this skill when pi:pi-companion-forwarder needs to ask Pi for help on a non-trivial coding or investigation task.
Pi runs whatever model the user has configured. By default this plugin targets DeepSeek V4 (Pro for review, Flash for everyday tasks). The guidance below assumes the prompt may run on either a non-reasoning model (Flash) or a reasoning model (Pro). Bias toward concrete, numbered checklists rather than abstract instructions — both model classes follow those reliably.
Core rules:
- Prefer one clear task per Pi run. Split unrelated asks into separate runs.
- Tell Pi what done looks like. Do not assume it will infer the desired end state.
- State explicit grounding rules whenever an unsupported guess would degrade quality.
- Use stable XML-style tag blocks so the prompt has obvious internal structure.
- Keep prose short. Prefer numbered checklists over paragraphs for procedural work.
Default prompt recipe:
<task>: the concrete job and the relevant repository or failure context. Include file paths.<output_contract>(or<structured_output_contract>for JSON): exact shape, ordering, and brevity requirements.<grounding_rules>: required for review, research, or anything that could drift into unsupported claims.<action_safety>: required for write-capable tasks — name the directories and file kinds Pi may touch.
When to add extra blocks:
- Coding or debugging: add
<completeness_contract>listing what counts as "done" (tests pass, lint clean, files touched). - Review or adversarial review: rely on the shipped
prompts/adversarial-review.mdandprompts/review.md. Do not hand-craft another review prompt. - Research or recommendation tasks: add a short
<sources>block listing what Pi is allowed to consult.
How to choose prompt shape:
- Use the built-in
/pi:reviewor/pi:adversarial-reviewcommands when the job is reviewing local git changes. Those prompts already carry the review contract. - Use
taskwhen the job is diagnosis, planning, research, or implementation and you need to control the prompt more directly. - Use
task --resume-lastfor follow-up instructions on the same Pi session. Send only the delta instruction instead of restating the whole prompt unless the direction changed materially.
Working rules:
- Prefer explicit prompt contracts over vague nudges.
- Do not raise reasoning (
--effort high) by default — DeepSeek Flash will not benefit, and DeepSeek Pro takes longer. Tighten the prompt before escalating effort. - For tool-heavy or long-running tasks, ask Pi for brief outcome-based progress updates inside its working notes.
- Keep claims anchored to observed evidence. If something is a hypothesis, mark it as such.
Prompt assembly checklist:
- Define the exact task and scope in
<task>. - State the output contract — JSON, bullet list, plain prose — and the maximum length.
- Decide whether Pi should keep going on its own judgment or stop for missing high-risk details.
- Add
<grounding_rules>and<action_safety>only where the task needs them. - Remove redundant instructions before sending the prompt.
Subagent-aware prompting
When pi-subagents is installed:
- For tasks with parallel workstreams, prepend
<available_pi_subagents>block before<task>. - Suggested agent routing: scout for exploration, researcher for web/docs, planner for design, worker for implementation, reviewer for code review.
- Never suggest subagents in adversarial-review or stop-review-gate prompts (those need deterministic behavior).
- The block is a suggestion, not a command — Pi decides whether to delegate.
- For dedicated multi-task parallel execution, use
/pi:parallel-rescue "task1" "task2" ...instead of manual prompt construction.
Related skills
More from agents365-ai/365-skills and the wider catalog.

pi-result-handling
Internal guidance for presenting Pi helper output back to the user

plantuml-skill
Generate UML diagrams, flowcharts, and architecture charts as PNG/SVG via Kroki API—no local install required.

semanticscholar-skill
Search academic papers, citations, and authors via Semantic Scholar API with structured workflows.

target-prioritization
Prioritize drug targets from ranked gene lists using multi-source evidence (UniProt, OpenTargets, PubMed, HPA, ChEMBL) and composite scoring.

tldraw-skill
Generate hand-drawn whiteboard-style diagrams as .tldr JSON, export to PNG/SVG with tldraw-cli.

ttscn
15-backend Chinese & multilingual TTS with word-level timestamps, pause markers, and pinyin overrides.