agentop: Skill for Claude Code

.github/skills/security/SKILL.md

security is a skill for Claude Code, Codex from macromania/agentop. It costs 52 tokens per session (2,967 once invoked), scanned A, original, MIT.

A set of security instructions for Electron and web applications, including authentication, input handling, secrets, and common attacks.

In plain words
What is it for?
It is for implementing or reviewing login permissions, input validation, secret handling, external data processing, and secure Electron settings.
Why use it?
It helps reduce risks such as unauthorized access, unsafe user input, cross-site scripting, request forgery, and injection attacks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is macromania/agentop's own configuration. It tells Claude Code and Codex how to work on agentop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentop configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is return fs.readFile(`./uploads/${filename}`); // ../../../etc/passwd.

Reuse

Borrowing it

Nothing to install: this file belongs to macromania/agentop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/macromania/agentop/main/.github/skills/security/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/macromania/agentop

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security

README.md
[![agentmods](https://agentmods.dev/badge/skills/macromania/agentop/security/github.svg)](https://agentmods.dev/skills/macromania/agentop/security)
Your own site
<a href="https://agentmods.dev/skills/macromania/agentop/security"><img src="https://agentmods.dev/badge/skills/macromania/agentop/security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security

Your own site · 80×15
<a href="https://agentmods.dev/skills/macromania/agentop/security"><img src="https://agentmods.dev/badge/skills/macromania/agentop/security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,967 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.02967
Opus 5.5 $0.00021 $0.01187
Sonnet 5.5 $0.00010 $0.00593
Haiku 4.5 $0.00005 $0.00297

Measured 2mo ago against content hash 3e438d9a60b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

exec: require('child_process').exec, // Never do this!
.github/skills/security/SKILL.md · 476 lines

How it starts

The opening of the file, as written. The whole thing — 476 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Best Practices

Security patterns and practices for building secure Electron applications with proper input validation, authentication, and defense against common vulnerabilities.

When to Use This Skill

  • Implementing authentication/authorization
  • Handling user input
  • Managing secrets and API keys
  • Processing external data
  • Reviewing code for security issues
  • Setting up Electron security

Core Security Principles

Defense in Depth

Layer multiple security controls:

// Layer 1: Input validation at entry point
function handleUserInput(input: string): void {
  const validated = validateInput(input);
  
  // Layer 2: Sanitization before processing
  const sanitized = sanitizeForProcessing(validated);
  
  // Layer 3: Parameterized queries (no string concatenation)
  await db.query('SELECT * FROM items WHERE name = ?', [sanitized]);
  
  // Layer 4: Output encoding for display
  const encoded = encodeForHTML(sanitized);
}

Principle of Least Privilege

Request only necessary permissions:

// ❌ Overly permissive
mainWindow = new BrowserWindow({
  webPreferences: {
    nodeIntegration: true,  // Dangerous!
    contextIsolation: false,  // Dangerous!
  }
});

// ✅ Minimal permissions
mainWindow = new BrowserWindow({
  webPreferences: {
    nodeIntegration: false,
    contextIsolation: true,
    sandbox: true,
    webSecurity: true,
    preload: path.join(__dirname, 'preload.js'),
  }
});

Electron Security

Secure Window Configuration

// src/main/window.ts
export function createSecureWindow(): BrowserWindow {
  const mainWindow = new BrowserWindow({
    width: 1200,
    height: 800,
    webPreferences: {
      // Security essentials
      nodeIntegration: false,
      contextIsolation: true,
      sandbox: true,
      webSecurity: true,
      allowRunningInsecureContent: false,
      
      // Preload for safe IPC
      preload: path.join(__dirname, 'preload.js'),
    },
  });
  
  // Prevent navigation to external URLs
  mainWindow.webContents.on('will-navigate', (event, url) => {
    const allowed = ['http://localhost:', 'file://'];
    if (!allowed.some(prefix => url.startsWith(prefix))) {
      event.preventDefault();
      console.warn('Blocked navigation to:', url);
    }
  });
  
  // Prevent new windows
  mainWindow.webContents.setWindowOpenHandler(({ url }) => {
    shell.openExternal(url);  // Open in system browser
    return { action: 'deny' };
  });
  
  return mainWindow;
}

Read the full file on GitHub · 476 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 476 lines · 52 tokens per session scan A 3e438d9a60b2

Subscribe to this mod's changes

security is a skill published in the GitHub repository macromania/agentop (11 stars, last pushed 7mo ago), licensed MIT. It adds 52 tokens to every session and 2,967 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

security compared with skills from other repositories

security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
securitymacromania/agentopSkill117mo agoMITA52Claude Code, Codex
eval-dataset-designbojieli/ai-agent-bookSkill57k29d agoApache-2.0A138Claude Code, Codex
aatmf-t10-confidentiality-breachPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A39Claude Code, Codex
mochi-remindkirodotdev/KiroCrewSkill4.8kyesterdayApache-2.0A20Claude Code, Codex
ensembl-databasesynthetic-sciences/openscienceSkill4.3k2d agoApache-2.0A45Claude Code, Codex
ai-musicZJU-REAL/EaselSkill4.5k4d agoApache-2.0A161Claude Code, Codex
skill-news-intelligenceZJU-REAL/EaselSkill4.5k4d agoApache-2.0A104Claude Code, Codex