defense
Detect manipulation patterns, identify tactics being used against you, get counter-moves.
Subagent orchestration for sophisticated opponent modeling and multi-party analysis.
$ npx -y skills add NovusEdge/palpatine --skill adversary --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/adversaryContext preview
The summary Claude sees to decide when to auto-load this skill.
Subagent orchestration for sophisticated opponent modeling and multi-party analysis.
name: adversary description: Subagent orchestration for sophisticated opponent modeling and multi-party analysis.
Invoked via Claude Code `/palpatine:adversary` or Codex `$palpatine:adversary`, or auto-triggered for:
**Use subagents when:**
**Don't use subagents when:**
Use these schemas in the controller. Agents return raw JSON; the controller parses it, validates the exact shape, and requests one correction before treating the response as a gap.
// Single adversary response
const ADVERSARY_SCHEMA = {
type: "object",
properties: {
counter: {
type: "string",
description: "Their response move, not reasoning"
},
exploits: {
type: "array",
items: { type: "string" },
maxItems: 3,
description: "Target weaknesses they'd hit"
},
escalation: {
type: "string",
description: "How they escalate if resisted"
},
weakPoint: {
type: "string",
description: "Where they're exposed"
}
},
required: ["counter", "exploits", "escalation", "weakPoint"]
}
// Multi-party player analysis
const PLAYER_SCHEMA = {
type: "object",
properties: {
move: { type: "string" },
alliance: {
type: "string",
description: "Who they side with and why it serves them"
},
threat: {
type: "string",
description: "How they could hurt target"
},
price: {
type: "string",
description: "Cost to neutralize or buy them off"
},
threatLevel: {
type: "string",
enum: ["high", "medium", "low"]
}
},
required: ["move", "alliance", "threat", "price", "threatLevel"]
}
function validateJsonObject(rawResponse, schema) {
let response;
try {
response = typeof rawResponse === "string"
? JSON.parse(rawResponse)
: rawResponse;
} catch {
return null;
}
if (response === null || typeof response !== "object" || Array.isArray(response)) {
return null;
}
const expectedKeys = [...schema.required].sort();
const actualKeys = Object.keys(response).sort();
if (
actualKeys.length !== expectedKeys.length ||
actualKeys.some((key, index) => key !== expectedKeys[index])
) {
return null;
}
for (const key of schema.required) {
const definition = schema.properties[key];
const value = response[key];
if (definition.type === "string" && typeof value !== "string") return null;
if (
definition.type === "array" &&
(!Array.isArray(value) ||
value.some((item) => typeof item !== definition.items.type) ||
(definition.maxItems !== undefined && value.length > definition.maxItems))
) {
return null;
}
if (definition.enum && !definition.enum.includes(value)) return null;
}
return response;
}**Codex:**
**Claude Code:**
Spawn one agent for focused opponent modeling:
async function runClaudeAdversary() {
let rawResponse = await Agent({
description: "Adversary: [role]",
prompt: `Model [OPPONENT] as ruthless rational actor.
OPPONENT: [role/name]
GOALS: [what they want — specific]
RESOURCES: [leverage, relationships, info, authority]
CONSTRAINTS: [what stops them from going nuclear]
TARGET is about to: [user's planned move]
Assume competent and self-interested. What's their counter-move?
Return only raw JSON with exactly these keys: counter, exploits, escalation, weakPoint.
No Markdown fences. Most likely play, stated cold.`
});
let response = validateJsonObject(rawResponse, ADVERSARY_SCHEMA);
if (!response) {
rawResponse = await Agent({
description: "Correct adversary JSON",
prompt: `The prior response was invalid: ${rawResponse}
Return only raw JSON with exactly these keys: counter, exploits, escalation, weakPoint.`
});
response = validateJsonObject(rawResponse, ADVERSARY_SCHEMA);
}
if (!response) throw new Error("Claude adversary returned invalid JSON after correction.");
return response;
}Dispatch only independent players. At most five player models run per invocation, and each wave is capped by current worker capacity:
const CODEX_TEAM_SLOT_LIMIT = 4;
function chooseUnusedRunComponent(agents, taskPrefix) {
const existingLeafNames = agents.map((agent) => agent.agent_name.split("/").at(-1));
for (let runIndex = 0; ; runIndex += 1) {
const runComponent = `r${runIndex}`;
const reservedPrefix = `${taskPrefix}_${runComponent}_`;
if (!existingLeafNames.some((name) => name.starHigh-functioning predator for Codex and Claude Code. No moralizing. No disclaimers. Pattern recognition without sentiment.
Detect manipulation patterns, identify tactics being used against you, get counter-moves.
Quick reference for the 48 Laws of Power. Browse, search, or get specific laws.
High-functioning predator. Pattern recognition without sentiment. People are systems. Outcomes are all that matter.
Quick reference for the Art of Seduction. Seducer types, 24-step process, anti-seducer traits.
Self-terminating recursive orchestrator. Dispatches waves of subagents until a verifiable done-condition passes or the budget…
Quick reference for the 33 Strategies of War. Browse, search, or get specific strategies.