bama
BAMA: Build Any Mac App. Agent skills to research, clone, design, build, optimize, and test native macOS apps with Swift and SwiftUI.
翻译准备中
使用 AI 代理执行安全设计审查、策略搜索和代码分析,通过 Prime Security 工具
AI 翻译
Use AI agents to perform security design reviews, policy searches, and code analysis via Prime Security tools
AI 摘要 · README
技能Python · JavaScriptGitHub @PrimeSecurityAI自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
安装型项目无需部署域名也可验证。个人仓库可通过 GitHub 登录验证,组织仓库可使用上方的仓库验证文件。
正在加载完整 README。 以下为已保存的摘录。
Agent Skills, Claude Code plugins, and an MCP server for working with Prime Security from AI agents: security design reviews, policy search, repository analysis, code reviews, security posture, and AI-assisted security conversations.
• A Prime Security account.
• HTTPS access to the Prime Security API.
• For the prime skill's browser login: python3 3.9 or later.
• For the Skills CLI installation only: Node.js 22.20.0 or later with npx, and HTTPS access to GitHub and npm.查看完整 README ↗Agent Skills, Claude Code plugins, and an MCP server for working with Prime Security from AI agents: security design reviews, policy search, repository analysis, code reviews, security posture, and AI-assisted security conversations.
| Component | What it does | Clients |
|---|---|---|
prime skill | Calls the Prime API using its published route documentation | Claude Code, Codex, OpenCode, Cursor |
| Prime MCP server | Exposes Prime as MCP tools | Claude (web, Desktop, mobile), Claude Code, any MCP client |
prime-security-operator plugin | The prime skill and the MCP server connection | Claude Code, Codex, Cursor |
prime-security-dev | Portable code guardrails skill and optional client hooks; Claude plugin retains MCP connection | Claude Code, Codex, OpenCode, Cursor |
prime skill's browser login: python3 3.9 or later.npx, and HTTPS access to GitHub and npm.On first use the prime skill opens your browser to log in to Prime Security, so the skill needs a Personal Access Token (PAT) only on machines without a browser. The development guardrails helper reads PRIME_PAT_TOKEN or the shared token file. MCP configurations except the Claude connector read PRIME_PAT_TOKEN; see Configure Credentials.
Use the Skills CLI for the primary cross-client installation:
npx skills add PrimeSecurityAI/prime-security-ai-plugins --skill prime --global
For a non-interactive installation targeting all four supported clients explicitly:
npx skills add PrimeSecurityAI/prime-security-ai-plugins --skill prime --global --agent claude-code --agent codex --agent opencode --agent cursor --yes
Choose one installation path. Do not install both the plain prime skill and the prime-security-operator Claude plugin for the same client; duplicate skills can produce ambiguous invocation and updates.
When Claude Code and OpenCode are targeted together, OpenCode may log a duplicate-source warning because it scans both ~/.agents/skills and Claude's compatibility directory. The Skills CLI links both paths to the same canonical installed copy, and OpenCode exposes one prime skill.
npx skills update prime --global --yes
npx skills remove prime --global --agent claude-code --agent codex --agent opencode --agent cursor --yes
Restart a client if it does not detect a newly installed, updated, or removed skill.
No setup is needed on a machine with a browser. When no credential is configured, the skill runs its browser login. After you log in and click Authorize, it saves a 30-day token to the token file below. The token appears under Settings > Access > API Token, where you can revoke it.
The skill resolves credentials in this order:
PRIME_PAT_TOKEN${XDG_CONFIG_HOME:-$HOME/.config}/prime-security/tokenPRIME_API_URL is optional and defaults to https://api.primesec.ai.
On machines without a browser (SSH, CI, containers), create a PAT under Settings > Access > API Token > Create Token instead. Never paste a PAT into an agent chat. Paste this into Bash or zsh on macOS/Linux. Input is hidden. Empty or invalid input leaves the existing token unchanged:
bash -c '
set -e
LC_ALL=C
IFS= read -r -s -p "Prime PAT: " prime_pat || {
[ "$?" -eq 1 ] && [ -n "$prime_pat" ]
} || {
printf "\nNo token entered; existing token unchanged.\n" >&2
exit 1
}
printf "\n"
prime_pat="${prime_pat%"$(printf "\r")"}"
prime_pat="${prime_pat#"${prime_pat%%[![:blank:]]*}"}"
prime_pat="${prime_pat%"${prime_pat##*[![:blank:]]}"}"
if [[ -z "$prime_pat" || "$prime_pat" == *[![:graph:]]* ]]; then
printf "Invalid token; existing token unchanged.\n" >&2
exit 1
fi
config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/prime-security"
umask 077
mkdir -p "$config_dir"
chmod 700 "$config_dir"
token_tmp=$(mktemp "$config_dir/token.XXXXXX")
trap "rm -f -- \"\$token_tmp\"" EXIT
printf "%s\n" "$prime_pat" > "$token_tmp"
mv -f -- "$token_tmp" "$config_dir/token"
'
On other systems, use hidden terminal input and a current-user-only ACL for the same logical token path. Do not print or log the token.
The MCP configurations below read only the PRIME_PAT_TOKEN environment variable, not the token file. Export it in the shell profile or environment that starts your agent, for example from the token file:
export PRIME_PAT_TOKEN="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/prime-security/token")"
If it is unset, the server rejects the connection with 401.
Prime exposes a remote MCP server over Streamable HTTP at https://api.primesec.ai/mcp. Its tools act as the signed-in user, within that user's account and permissions.
| Tools | Purpose |
|---|---|
get_design_docs, get_design_doc_by_id | Security design reviews |
get_repositories, get_repository_by_id, get_repository_code_issues | Code repositories and their findings |
get_posture_metrics | Security posture metrics |
get_all_products | Products |
start_prime_ai_conversation, ask_prime_ai, get_prime_ai_answer | Ask Prime's security AI a free-form question, then poll get_prime_ai_answer until the answer is complete |
search_prime_operations, call_prime_operation | Find and run any other Prime API operation |
call_prime_operation can run operations that change data in your Prime account. Review those calls before approving them.
https://api.primesec.ai/mcp as the URL.claude and no client secret.On Team and Enterprise plans, an organization Owner adds the connector, and each member connects and signs in. The connector is then available in Claude on the web, Desktop, and mobile, and in Claude Code.
Installing either Claude Code plugin connects the server, using PRIME_PAT_TOKEN and PRIME_API_URL when set. Installing both plugins still connects to it once.
Without a plugin, add it at user scope. This stores the token in your Claude Code configuration:
claude mcp add --transport http --scope user prime https://api.primesec.ai/mcp --header "Authorization: Bearer $PRIME_PAT_TOKEN"
The operator Codex plugin connects the server; see Codex Plugins. Without a plugin:
codex mcp add prime --url https://api.primesec.ai/mcp --bearer-token-env-var PRIME_PAT_TOKEN
Or add it to ~/.codex/config.toml:
[mcp_servers.prime]
url = "https://api.primesec.ai/mcp"
bearer_token_env_var = "PRIME_PAT_TOKEN"
Add it to ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"prime": {
"type": "remote",
"url": "https://api.primesec.ai/mcp",
"oauth": false,
"headers": {
"Authorization": "Bearer {env:PRIME_PAT_TOKEN}"
}
}
}
}
Add it to ~/.cursor/mcp.json:
{
"mcpServers": {
"prime": {
"url": "https://api.primesec.ai/mcp",
"headers": {
"Authorization": "Bearer ${env:PRIME_PAT_TOKEN}"
}
}
}
}
Connect to https://api.primesec.ai/mcp over Streamable HTTP and send Authorization: Bearer <PAT>. Keep the PAT in the client's secret or environment configuration, never in a chat.
All clients can select prime automatically from a natural-language request.
| Client | Explicit invocation | Example |
|---|---|---|
| Claude Code | /prime | /prime review this design for security risks |
| Codex | $prime | $prime search our policies for password requirements |
| OpenCode | Ask it to use prime | Use the prime skill to review this design |
| Cursor | Ask it to use prime | Use the prime skill to analyze this repository |
If the Skills CLI is unavailable, copy the canonical directory at plugins/prime-security-operator/skills/prime into the skill directory as a folder named prime:
| Client | User skill directory |
|---|---|
| Claude Code | ~/.claude/skills/prime |
| Codex | ~/.agents/skills/prime |
| OpenCode | ~/.agents/skills/prime |
| Cursor | ~/.agents/skills/prime |
For several clients, keep one copy at ~/.agents/skills/prime and link ~/.claude/skills/prime to it for Claude Code. On systems without links, use the client-specific directories. Do not combine manual installation with the Skills CLI or marketplace installation.
The Claude marketplace remains available for backward compatibility, and its plugins also connect the MCP server:
claude plugin marketplace add PrimeSecurityAI/prime-security-ai-plugins
claude plugin install prime-security-operator@prime
Inside Claude Code, the equivalents are /plugin marketplace add PrimeSecurityAI/prime-security-ai-plugins and /plugin install prime-security-operator@prime.
The plugin skill is invoked as /prime-security-operator:prime in Claude Code.
Both plugins also ship Cursor manifests, and .cursor-plugin/marketplace.json lists them. Each bundles its skill and the Prime MCP server, which reads PRIME_PAT_TOKEN from the environment that starts Cursor. Team admins can import this repository as a team marketplace. For a local install, copy the plugin directory (for example plugins/prime-security-operator) to ~/.cursor/plugins/local/<plugin-name>, then run Developer: Reload Window. Install a plugin or the Skills CLI skill for Cursor, not both. For development guardrails across Claude Code, Codex, OpenCode, and Cursor, see the prime-security-dev installation guide.
The Codex marketplace (.agents/plugins/marketplace.json) lists both plugins:
codex plugin marketplace add PrimeSecurityAI/prime-security-ai-plugins
codex plugin add prime-security-operator@prime
The operator plugin bundles the prime skill and the Prime MCP server, which reads PRIME_PAT_TOKEN and always uses https://api.primesec.ai/mcp; Codex does not expand PRIME_API_URL in plugin MCP URLs. Install a plugin or the Skills CLI skill for Codex, not both.
The cross-client Prime API skill packaged for Claude Code, Codex, and Cursor, plus the MCP server connection. Its only canonical skill source is plugins/prime-security-operator/skills/prime/SKILL.md.
Portable prime-code-guardrails skill for Claude Code, Codex, and OpenCode, with safe shared credentials, a bundled API helper, and optional client lifecycle integrations. The Claude plugin retains its MCP server connection. Install separately from the operator skill; see the installation and support guide.
.claude-plugin/marketplace.json Claude marketplace
.agents/plugins/marketplace.json Codex marketplace
.cursor-plugin/marketplace.json Cursor marketplace
plugins/
|-- prime-security-operator/
| |-- .claude-plugin/ .codex-plugin/ .cursor-plugin/
| |-- .mcp.json
| `-- skills/prime/SKILL.md
`-- prime-security-dev/
|-- .claude-plugin/ .codex-plugin/ .cursor-plugin/
|-- .mcp.json
|-- hooks/hooks.json codex.json cursor.json
`-- skills/prime-code-guardrails/
MIT