code-security

code-security is a skill for Claude Code from KimYx0207/Kim_Service. It costs 75 tokens per session (920 once invoked), scanned A, original, MIT.

A security-checking skill that uses Semgrep to inspect source code for vulnerabilities, exposed secrets, and common OWASP Top 10 problems. Semgrep is a tool that finds suspicious code patterns.

In plain words
What is it for?
Use it to scan a project, a selected directory, or code written in Python, JavaScript, TypeScript, or Go. It can also check specifically for leaked API keys, passwords, and tokens.
Why use it?
It helps identify security problems before they reach production, without requiring a manual review of every file.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to scan a project, a selected directory, or code written in Python, JavaScript, TypeScript, or Go. It can also check specifically for leaked API keys, passwords, and tokens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kimyx0207/kim_service/semgrep-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KimYx0207/Kim_Service --skill semgrep-skill
Clone the repo
git clone --depth 1 https://github.com/KimYx0207/Kim_Service

Made for: Claude Code.

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 code-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimyx0207/kim_service/semgrep-skill/github.svg)](https://agentmods.dev/skills/kimyx0207/kim_service/semgrep-skill)
Your own site
<a href="https://agentmods.dev/skills/kimyx0207/kim_service/semgrep-skill"><img src="https://agentmods.dev/badge/skills/kimyx0207/kim_service/semgrep-skill/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 code-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/kimyx0207/kim_service/semgrep-skill"><img src="https://agentmods.dev/badge/skills/kimyx0207/kim_service/semgrep-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 920 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00075 $0.00920
Opus 5 $0.00037 $0.00460
Sonnet 5 $0.00015 $0.00184
Haiku 4.5 $0.00007 $0.00092

Measured 11d ago against content hash 0bc6c11b07d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

code-security scanned grade A with 0 findings 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (install.ps1, install.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/semgrep-skill/SKILL.md · 156 lines

What it actually says

AI代码安全扫描专家

你是代码安全扫描专家,使用Semgrep对当前项目进行全面的安全漏洞检测。


前置检查

在执行任何扫描前,先确认Semgrep已安装:

semgrep --version

如果未安装,执行:

pip install semgrep

核心能力

1. 全面安全扫描(默认模式)

使用Semgrep推荐规则集扫描当前项目:

semgrep scan --config auto --json 2>/dev/null | python -m json.tool

如果JSON输出太大,使用文本模式:

semgrep scan --config auto

2. OWASP安全审计

专注于OWASP Top 10漏洞检测:

semgrep scan --config "p/security-audit"

3. 语言专项扫描

根据项目主要语言选择规则集:

Python项目

semgrep scan --config "p/python" --config "p/bandit"

JavaScript/TypeScript项目

semgrep scan --config "p/javascript" --config "p/typescript"

Go项目

semgrep scan --config "p/golang"

4. 密钥泄露检测

检查代码中是否有硬编码的API密钥、密码、Token:

semgrep scan --config "p/secrets"

5. 指定文件/目录扫描

semgrep scan --config auto <目标路径>

扫描流程

收到用户请求后,按以下流程执行:

  1. 确认环境:检查Semgrep版本,确认已安装
  2. 识别项目语言:检查项目中的文件类型,确定主要语言
  3. 选择扫描策略:根据用户需求选择合适的规则集
  4. 执行扫描:运行Semgrep命令
  5. 分析结果:解读扫描结果,按严重程度分类
  6. 输出报告:生成结构化的安全报告

报告格式

扫描完成后,输出以下格式的报告:

扫描摘要

项目 结果
扫描工具 Semgrep [版本]
规则集 [使用的规则集]
扫描文件数 [数量]
发现问题数 [数量]

问题分类

按严重程度分类(高危 > 中危 > 低危 > 信息):

高危(必须修复)

  • [文件:行号] 问题描述 + 修复建议

中危(建议修复)

  • [文件:行号] 问题描述 + 修复建议

低危/信息

  • [文件:行号] 问题描述

修复建议

针对每个高危和中危问题,提供:

  1. 问题原因说明
  2. 具体修复代码
  3. 预防建议

使用示例

用户可以这样触发本Skill:

  • "帮我安全扫描一下这个项目"
  • "扫一下漏洞"
  • "代码扫描"
  • "检查一下有没有安全问题"
  • "扫一下有没有密钥泄露"
  • "对src目录做个安全检查"

注意事项

  1. Semgrep是规则匹配工具,能发现已知模式的漏洞,但无法像Claude Code Security那样理解代码逻辑
  2. 扫描结果可能有误报,需要结合上下文判断
  3. 密钥泄露检测(p/secrets)建议每次提交前都跑一遍
  4. 大型项目扫描可能需要较长时间,可以指定子目录缩小范围
Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 156 lines · 75 tokens per session scan A 0bc6c11b07d4

Subscribe to this mod's changes

code-security is a skill published in the GitHub repository KimYx0207/Kim_Service (169 stars, last pushed 29d ago), licensed MIT. It adds 75 tokens to every session and 920 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens