AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Prompt Refactor

skill-microsoft-hve-core-prompt-refactor · by microsoft

Refactor existing prompt artifacts against explicit requirements through the full prompt-builder loop.

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-microsoft-hve-core-prompt-refactor

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-microsoft-hve-core-prompt-refactor)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Prompt Refactor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Prompt Refactor Skill

This skill runs the full phase loop of the prompt-builder skill—test, evaluate, research, and update—focused on refactoring existing artifacts. Use the prompt-builder skill's orchestration reference for the phase loop, the sandbox contract, the Prompt Tester, Prompt Evaluator, Researcher Subagent, and Prompt Updater dispatch matrix, the artifact paths, and the cleanup contract. This skill adds only the refactor scope, the cleanup heuristics in [references/refactor-checklist.md](references/refactor-checklist.md), and the validation-selection guidance in [references/validation-matrix.md](references/validation-matrix.md).

Goal

Refactor existing prompt-engineering artifacts by simplifying, consolidating, and removing confusion while preserving functional intent. When no explicit requirements are supplied, run a baseline evaluation first and derive refactoring objectives from the evaluation findings plus the standard cleanup checklist.

Flow

  1. Confirm the target existing artifacts and any explicit requirements. Derive the sandbox path from the primary target artifact using the deterministic pattern .copilot-tracking/sandbox/{{YYYY-MM-DD}}-{{topic}}-{{run-number}}, where {{YYYY-MM-DD}} is today's date and {{topic}} is the primary artifact's base name with the suffix stripped, or the parent folder name when the target is a SKILL.md, in kebab-case. When multiple promptFiles are supplied, use the lexically first entry as the primary artifact. See the prompt-builder skill's orchestration reference for the full sandbox and dispatch contract.
  2. Run one baseline execution and evaluation in the sandbox with Prompt Tester and Prompt Evaluator, then inspect the evaluation log. When requirements were omitted, derive the refactor objectives from this baseline evaluation plus the standard cleanup checklist.
  3. Review the artifacts for clarity problems, duplication, confusing structure, and unnecessary examples by using [references/refactor-checklist.md](references/refactor-checklist.md).
  4. Apply focused refactor edits that align to the requirements or derived objectives and the Prompt Quality Criteria through Prompt Updater, preserving functional intent unless a requirement changes it.
  5. Select and run the narrowest relevant validation from [references/validation-matrix.md](references/validation-matrix.md), including changed-file scope checks and any artifact-specific validation available in the repository. Record skipped validations with reasons.
  6. Re-enter the execution and evaluation loop until the requirements or derived objectives are satisfied, the evaluation log shows no remaining issues, and the selected validations pass or are documented as skipped.

Inputs

  • promptFiles: (Optional) Existing prompt artifact(s) to refactor. Defaults to the current open or attached file(s).
  • requirements: (Optional) Explicit refactoring objectives, constraints, or acceptance criteria. When omitted, derive the objectives from a baseline evaluation and the standard cleanup checklist.

Success criteria

  • The target artifacts are cleaner, more consistent, and easier to follow.
  • Duplication and confusing structure are consolidated or removed.
  • The baseline and follow-up execution and evaluation loops complete, selected validations are reported, and the stated requirements or derived refactor objectives are met.
  • The sandbox files created for the run are cleaned up before the final response unless the user asked to keep them.

Constraints

  • Focus on existing artifacts; do not create new prompt artifacts as the primary outcome.
  • Use the execution and evaluation loop rather than a one-pass edit.
  • Preserve functional intent unless a requirement explicitly changes it.
  • Keep sandbox edits inside the assigned sandbox folder and clean them up before the final response unless the user asked to keep them.
  • When requirements are omitted, run a baseline evaluation first and derive the refactor objectives from the evaluation findings plus the standard cleanup checklist.

Stop rules

  • Finalize when the requirements or derived refactor objectives are satisfied and the loop is complete.
  • Re-enter the loop when the evaluation log or evaluator findings show remaining issues.
  • Stop and ask when the request or requirements are too vague to act on safely.

Handoff

If the request needs a deeper read-only review, recommend /prompt-analyze. For broader create or update work, recommend /prompt-builder.

Final response contract

Report the changed files, refactor rationale, evaluation or validation status, skipped validations with reasons, and any remaining issues.

> Brought to you by microsoft/hve-core

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.