Skip to content
Back to skills

Meta Prompting

ASecurity

Agents optimizing prompts for other agents (Chain of Thought, Tree of Thoughts). Use when: meta prompting.

  • 23 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsgorailsapisecurity

Works with

  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add andreibesleaga/GABBE --skill meta-prompting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Meta Prompting?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Meta Prompting
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-meta-prompting/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-meta-prompting)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: meta-prompting
description: "Agents optimizing prompts for other agents (Chain of Thought, Tree of Thoughts). Use when: meta prompting."
license: CC-BY-SA-4.0
metadata:
  source: "agents/skills/coordination/meta-prompting.skill.md"
  tags: "coordination"
  core: "true"
  context_cost: "low"
---
# meta-prompting Skill

## Goal
This skill enables "Meta-Cognition": thinking about how to think.

## Steps
## 1. Optimization Strategies
- **CoT (Chain of Thought)**: "Let's think step by step." (Force reasoning before answer).
- **ToT (Tree of Thoughts)**: "Generate 3 possible solutions. Evaluate each. Pick the best."
- **Few-Shot**: Provide 3 examples of "Input -> Output" to guide the model.

## 2. Dynamic Prompt Construction
Instead of static prompts, build them based on context:
1.  **Role**: "You are a world-class [Role]."
2.  **Context**: "We are building [Project]. The tech stack is [Stack]."
3.  **Constraint**: "Do not use [Forbidden Lib]. Answer in [Format]."

## 3. Self-Correction Prompts
- "Review your previous answer. Did you meet all requirements? If not, rewrite it."
- "Are there any security vulnerabilities in the code you just wrote?"

## 4. Tool Use Prompts
- "You have access to `grep`. Use it to find the definition of `User` class before guessing."

## Security & Guardrails

### 1. Skill Security (Meta-Prompting)
- **Injection Isolation in Templates**: When dynamically constructing prompts (Role + Context + Constraints), all variable data (like Project stack or forbidden libs) must be properly escaped and isolated using XML/JSON boundaries to prevent template injection.
- **Self-Correction Consistency**: Self-correction prompts MUST prioritize checking for safety constraints (PII leakage, malicious code) above simple formatting or accuracy checks.

### 2. System Integration Security
- **Dynamic Context Verification**: Ensure that any dynamic context retrieved for the prompt (e.g., pulling code from a repo) has already passed through access-control checks confirming the user is authorized to view that context.
- **Compute Budgeting**: Tree of Thoughts (ToT) generates exponential pathways. Implement strict branching limits and token budget caps to prevent Denial of Service due to massive API cost spikes.

### 3. LLM & Agent Guardrails
- **Prompt Masking**: If providing "Few-Shot" examples from past episodic memory, explicitly scrub and mask all real user data, credentials, and identifiable information before inclusion in the meta-prompt.
- **Tool Sandbox Priming**: When advising on tool usage (e.g., "Use `grep` before guessing"), the meta-prompting engine must forcefully remind the downstream agent of the strict security boundaries of that tool (e.g., "...but only search within `/app/src/`").

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.