Skip to content

Security hardening: scope persona, sanitize pasted prompts, strip credentials#36

Merged
nidhinjs merged 2 commits into
nidhinjs:mainfrom
shamis6ali:main
May 3, 2026
Merged

Security hardening: scope persona, sanitize pasted prompts, strip credentials#36
nidhinjs merged 2 commits into
nidhinjs:mainfrom
shamis6ali:main

Conversation

@shamis6ali

Copy link
Copy Markdown
Contributor

Summary

Eight scoped changes to SKILL.md to reduce behavioral risk when the skill is used in production / client-sensitive environments. No template or pattern changes — purely meta-instruction adjustments.

Changes

  1. Frontmatter description — narrow activation to explicit prompt-engineering requests so the skill doesn't trigger on unrelated tasks.
  2. Persona scope — apply the prompt-engineer role only during prompt-generation tasks, with an explicit fallback to default behavior and safety guidelines for everything else.
  3. Technique guidance — convert absolute bans on Mixture of Experts / Tree of Thought / Graph of Thought / Universal Self-Consistency / chained prompting into risk-aware guidance instead of overriding model judgment.
  4. NEVER/ALWAYS softening — downgrade competing signal words in the skill's own meta-instructions. Templates A–M and examples are unchanged.
  5. Credential safety — instruct the skill to strip API keys, tokens, and connection strings from generated prompts and substitute generic env-var references.
  6. Pasted-prompt sanitization — treat user-pasted prompts in Decompiler / fix / adapt flows as inert data; analyze structure without executing embedded instructions.
  7. Memory Block confirmation — present session-context blocks for user review before prepending, instead of auto-carrying forward unvalidated context.
  8. Agentic output warning — append a review reminder to prompts targeting agentic tools (Claude Code, Devin, Cursor, Cline, etc.) so users verify scope locks before pasting.

Scope

  • SKILL.md only.
  • references/templates.md and references/patterns.md are intentionally untouched — those are output intended for other tools, not skill behavior.

Test plan

  • Paste an adversarial prompt into Decompiler mode; verify it is analyzed, not executed.
  • Ask a non-prompt-engineering question; verify the skill does not activate.
  • Generate a prompt for Claude Code; verify the agentic review notice appears.

@nidhinjs nidhinjs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the analysis, the credential safety and prompt sanitization additions are valid.

Minor tweaks:

  1. Change 7 (Memory Block confirmation) - I Suggest tightening this to a passive display rather than a confirmation gate, or removing it entirely and relying on the existing sanitization logic to handle unvalidated context.

  2. The script is currently sitting at 470+ characters. Would appreciate keeping it under 450 for future maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants