InCountry AgentCloak — Coding Agent Skill
AI Coding Agent Skill for InCountry AgentCloak: runtime PII cloaking/uncloaking via MCP server and environment configuration via Portal API.
Description
Mode 1 — On-demand cloaking
Ask the agent to cloak or uncloak a value right now. Without modifying any code, the agent calls the MCP server directly and returns the result to you.
Cloak the name "Alice Johnson"
Uncloak <cloaked text> with id <cloak-id>
Mode 2 — Code integration
Ask the agent to add PII protection to an existing application. The agent reads the source file, adds a cloak call to the MCP server, and updates the output to display cloaked values instead of originals.
Add PII protection to acme-crm.ts using the AgentCloak MCP server.
Cloak the full names of all customers before printing them.
The application has no knowledge of AgentCloak before the agent touches it.
Diagram — How it fits into your product
The agent adds one function and one call to your existing code — no SDK, no new dependencies, just a fetch to the MCP server.
Installation
Recommended — Vercel skills CLI (interactive, detects 55+ agents):
npm install -g skills # install CLI once
npx skills add agentcloak/skill
Prompts you to select which agents to install for. Always includes OpenCode, Cursor, Cline, Codex, Claude Code, GitHub Copilot, and others automatically.
For scripts and CI/CD (non-interactive, no prompts):
# Project-level — installs to .agents/skills/ and .claude/skills/
npx github:agentcloak/skill
# Global — installs for all projects system-wide
npx github:agentcloak/skill -g
# List available skills
npx github:agentcloak/skill --list
After install, the skill is available to any agent that reads from the installed directory.
Usage
Environment variables
Set before opening your agent:
export INC_MCP_URL="https://us-mt-01.api.incountry.io/mcp"
export INC_MCP_API_KEY="<uuid>:<token>"
| Variable | Description |
|---|---|
INC_MCP_URL | MCP server URL (from your environment's mcp_server_url field) |
INC_MCP_API_KEY | MCP server API key (<uuid>:<token> format) |
INC_BASE_URL | Portal API base URL (default: https://portal.incountry.com/api) |
INC_ENV_ID | Environment ID (UUID) |
INC_API_KEY | Portal API key (prefix inc_v1_...) |
Cloak / Uncloak via curl
Cloak:
curl -s -X POST "$INC_MCP_URL" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-inc-agentcloak-api-key: $INC_MCP_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "cloak",
"arguments": { "message": "John Smith, age 34" }
}
}'
Uncloak (requires id from cloak response):
curl -s -X POST "$INC_MCP_URL" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-inc-agentcloak-api-key: $INC_MCP_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 2,
"params": {
"name": "uncloak",
"arguments": { "message": "<cloaked text>", "id": "<cloak-id>" }
}
}'
Calling from TypeScript / Node.js (fetch)
async function callMcp(tool: "cloak" | "uncloak", args: Record<string, string>) {
const res = await fetch(process.env.INC_MCP_URL!, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
"x-inc-agentcloak-api-key": process.env.INC_MCP_API_KEY!,
},
body: JSON.stringify({
jsonrpc: "2.0",
method: "tools/call",
id: 1,
params: { name: tool, arguments: args },
}),
});
const data = await res.json();
return data.result.structuredContent as { result: string; id: string };
}
// Cloak
const { result: cloaked, id: cloakId } = await callMcp("cloak", { message: "Alice Johnson" });
// Uncloak
const { result: original } = await callMcp("uncloak", { message: cloaked, id: cloakId });
Batch cloaking (preferred when processing multiple values at once):
const message = names.join("\n");
const { result: cloakedBatch, id: cloakId } = await callMcp("cloak", { message });
const cloaked = cloakedBatch.split("\n");
// cloaked[0] = "Kenji Tanaka", cloaked[1] = "Maria Garcia", ...
Example Prompts
On-demand:
Cloak the name "Maria Garcia" using the MCP server
What PII cloaking options are available?
Code integration:
Add PII protection to server.ts. Before returning customer records from
GET /api/customers, cloak all fullName fields.
Add a "Protect PII" button to the page. When clicked, cloak all customer
names and update the table.
Environment configuration:
Show border config in environment c6b9a629-...
In environment c6b9a629-..., change email redaction strategy to emailPersistent
Add masking for field $.address in environment c6b9a629-...