Token导航 LogoToken导航

Agent Skill · 前端设计

promptscript(promptscript 前端)

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

promptscript 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 8,327。

总安装 294周安装 12GitHub Stars 4下载 94核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:promptscript(promptscript 前端)
来源仓库:https://github.com/mrwogu/promptscript
仓库路径:skills/promptscript
安装命令:
npx skills add https://github.com/mrwogu/promptscript --skill promptscript
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mrwogu/promptscript --skill promptscript

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助前端页面与组件的开发与维护。promptscript 属于前端设计类 Skill,可作为该场景下的辅助能力补充。适合生成 React、Next.js 或 Vue 相关的代码结构和样式。使用时需匹配项目技术栈和目录组织方式,避免结构冲突。建议配合本地构建和浏览器预览验证视觉效果。

涉及页面改动时应检查文本溢出、对齐和响应式表现。

来源仓库内路径:skills/promptscript

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/mrwogu/promptscript --skill promptscript;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

promptscript 怎么安装?

在终端执行 npx skills add https://github.com/mrwogu/promptscript --skill promptscript。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

promptscript 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

promptscript 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

promptscript 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

promptscript 用的人多吗?

公开数据是累计安装 294 次,近一周安装 12 次,下载 94 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

promptscript 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
promptscript

promptscript 前端 · 本页

2944需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

PromptScript Language Guide

PromptScript is a domain-specific language that compiles .prs files into native instruction formats for AI coding assistants (GitHub Copilot, Claude Code, Cursor, Antigravity, Factory AI, OpenCode, Gemini CLI). One source of truth, multiple outputs.

File Structure

A .prs file is made of blocks. Order doesn't matter except @meta should come first by convention.

# Comments start with #

@meta { ... }           # Required metadata
@inherit @path          # Single inheritance (optional)
@use @path [as alias]   # Imports/mixins (optional, multiple)

@identity { ... }       # AI persona
@context { ... }        # Project context
@standards { ... }      # Coding conventions
@restrictions { ... }   # Hard rules
@shortcuts { ... }      # Command aliases
@knowledge { ... }      # Reference documentation
@skills { ... }         # Reusable skill definitions
@agents { ... }         # Subagent definitions
@params { ... }         # Template parameters
@guards { ... }         # File globs and priorities
@local { ... }          # Private config (not committed)
@extend path { ... }    # Modify imported blocks
@custom-name { ... }    # Arbitrary named blocks

Content Types

PromptScript has three content types inside blocks:

Text Content

Use triple quotes (three double-quote characters) to wrap multiline text. Text is automatically dedented - leading whitespace from source indentation is stripped. Use for prose, markdown, or freeform content.

Example: @identity with a text block describing an AI persona starting with "You are..."

Object Content (key-value pairs)

@context {
  project: "My App"
  team: "Frontend"
  monorepo: {
    tool: "Nx"
    packageManager: "pnpm"
  }
}

Values can be strings (quoted or unquoted), numbers, booleans, nested objects, or arrays.

Array Content

@standards {
  code: [
    "Use strict TypeScript",
    "Named exports only"
  ]
}

@restrictions {
  - "Never use any type"
  - "Never commit secrets"
}

Mixed Content

Blocks can contain both object properties and text in the same block. Place the triple-quoted text block alongside key-value pairs.

Block Reference

@meta (required)

@meta {
  id: "project-id"        # Required: unique identifier
  syntax: "1.0.0"         # Required: syntax version (semver)
  org: "Company Name"     # Optional
  team: "Frontend"        # Optional
  tags: [react, ts]       # Optional
  params: {               # Optional: template parameters
    projectName: string
    port: number = 3000
    debug?: boolean
    framework: enum("react", "vue") = "react"
  }
}

@identity

Defines AI persona. Start with "You are..." for consistent output across all formatters. Contains a triple-quoted text block with the persona description.

@context

Project context with structured properties (project, team, languages, runtime) plus optional triple-quoted text for architecture details, diagrams, etc.

@standards

Category-based conventions. Any category name is valid:

@standards {
  typescript: ["Strict mode", "No any type"]
  naming: ["Files: kebab-case.ts", "Classes: PascalCase"]
  git: {
    format: "Conventional Commits"
    types: [feat, fix, docs, refactor, test, chore]
  }
}

@restrictions

Hard rules as a list of dash-prefixed strings:

@restrictions {
  - "Never expose API keys"
  - "Never commit secrets to version control"
  - "Always validate user input"
}

@shortcuts

Simple strings appear as documentation. Objects with prompt: true generate executable prompt/command files for GitHub Copilot and Cursor:

@shortcuts {
  "/review": "Review code for quality"
  "/test": {
    prompt: true
    description: "Write unit tests"
    content: (triple-quoted text with instructions)
  }
}

@skills

Reusable skill definitions with metadata:

@skills {
  commit: {
    description: "Create git commits"
    trigger: "commit, git commit"
    disableModelInvocation: true
    userInvocable: true
    allowedTools: ["Bash", "Read"]
    content: (triple-quoted text with skill instructions)
  }
}

Properties: description (required), content (required), trigger, disableModelInvocation, userInvocable, allowedTools, context ("fork" or "inherit"), agent, requires, inputs, outputs.

Parameterized Skills

Skills in .promptscript/skills/<name>/SKILL.md support template parameters via YAML frontmatter. Define params in frontmatter and use {{variable}} in content:

---
name: review
description: 'Review {{language}} code for {{standard}}'
params:
  language:
    type: string
  standard:
    type: string
    default: 'best practices'
---
Review the code using {{language}} conventions following {{standard}}.

Pass values in @skills block:

@skills {
  review: {
    description: "Review code"
    language: "typescript"
    standard: "strict mode"
  }
}

Non-reserved properties (anything other than description, content, trigger, userInvocable, allowedTools, disableModelInvocation, context, agent, requires, inputs, outputs) are treated as skill parameter arguments.

Skill Dependencies

Skills can declare dependencies on other skills via requires:

@skills {
  deploy: {
    description: "Deploy service"
    requires: ["lint-check", "test-suite"]
    content: (triple-quoted text)
  }
}

The validator (PS016) checks that required skills exist, detects self-references, and catches circular dependency chains.

Skill Contracts (Inputs/Outputs)

Skills can declare typed inputs and outputs in SKILL.md frontmatter:

---
name: security-scan
description: 'Scan for vulnerabilities'
inputs:
  files:
    description: 'Files to scan'
    type: string
  severity:
    description: 'Minimum severity'
    type: enum
    options: [low, medium, high]
    default: medium
outputs:
  report:
    description: 'Scan report'
    type: string
  passed:
    description: 'Whether scan passed'
    type: boolean
---

Field types: string, number, boolean, enum (with options list). The validator (PS017) checks field types, ensures enum fields have options, and warns if param names collide with input names.

Shared Resources

Skills in a folder can share common resources via .promptscript/shared/:

.promptscript/
  shared/
    templates.md         # Shared across all skills
    style-guide.md
  skills/
    review/
      SKILL.md           # Gets @shared/templates.md, @shared/style-guide.md
    deploy/
      SKILL.md           # Also gets shared resources

Files in shared/ are automatically included in every skill with @shared/ prefix.

@agents

Custom subagent definitions. Compiles to .claude/agents/ for Claude Code, .github/agents/ for GitHub Copilot, .factory/droids/ for Factory AI, etc.

@agents {
  code-reviewer: {
    description: "Reviews code quality"
    tools: ["Read", "Grep", "Glob", "Bash"]
    model: "sonnet"
    permissionMode: "default"
    content: (triple-quoted text with agent instructions)
  }
}

Supports mixed models per agent: specModel sets a different model for Specification/planning mode (GitHub, Factory), specReasoningEffort sets reasoning effort for the spec model (Factory only, values: "low", "medium", "high").

Factory AI droids support additional properties: model (any model ID or "inherit"), reasoningEffort ("low", "medium", "high"), and tools (category name like "read-only" or array of tool IDs).

@knowledge

Reference documentation as triple-quoted text. Used for command references, API docs, and other material that should appear in the output.

@params

Template parameter definitions with types: string, number, boolean, enum("a", "b"). Optional parameters use ? suffix. Defaults use = value.

@guards

File glob patterns and priority rules for path-specific instructions.

@local

Private local configuration. Not included in compiled output or committed to git.

Inheritance and Composition

@inherit (single, linear)

One per file. Child blocks merge on top of parent:

@inherit @company/frontend-team
@inherit ./parent
@inherit @stacks/react-app(projectName: "my-app", port: 3000)

@use (multiple, mixins)

Import and merge fragments:

@use @core/security
@use @core/quality
@use ./local-config
@use @core/typescript as ts   # alias enables @extend access

Merge rules:

  • Text: concatenated with deduplication
  • Objects: deep merged (target wins on conflicts)
  • Arrays: unique concatenation

@extend (modify imported blocks)

Requires an aliased @use:

@use @core/typescript as ts

@extend ts.standards {
  testing: { coverage: 95 }
}

Parameterized Inheritance (Template Variables)

Use {{variable}} placeholders in a parent/template file, and pass values from the child file via @inherit or @use with (key: value) syntax.

IMPORTANT: Variables are NOT set from promptscript.yaml or CLI. They are passed from one .prs file to another through @inherit or @use.

Step 1: Create the template (parent file with params in @meta):

# base.prs — reusable template
@meta {
  id: "service-template"
  syntax: "1.0.0"
  params: {
    serviceName: string
    port?: number = 3000
  }
}

@identity {
  """
  You are working on {{serviceName}} running on port {{port}}.
  """
}

Step 2: Inherit with values (child file passes params):

# project.prs — concrete project
@meta { id: "user-api" syntax: "1.0.0" }

@inherit ./base(serviceName: "user-api", port: 8080)

After compilation, {{serviceName}} becomes user-api and {{port}} becomes 8080.

The same works with @use:

@use ./base(serviceName: "auth-service") as auth

Parameter types: string, number, boolean, enum("a", "b"). Optional params use ? suffix. Defaults use = value. Missing required params produce a compile error.

Multi-service pattern — reuse one template across many projects:

services/
  base.prs                          # template with params
  user-api/
    promptscript.yaml               # source: project.prs
    project.prs                     # @inherit ../base(serviceName: "user-api")
  auth-service/
    promptscript.yaml
    project.prs                     # @inherit ../base(serviceName: "auth-service")

Configuration: promptscript.yaml

Auto-injection

This skill is automatically included when compiling with prs compile. No manual copying needed. To disable, set includePromptScriptSkill: false in your promptscript.yaml.

id: my-project
syntax: "1.1.0"
description: "My project description"
input:
  entry: .promptscript/project.prs
  include: ['.promptscript/**/*.prs']
targets:
  github:
    version: full      # simple | multifile | full
  claude:
    version: full
  cursor:
    version: standard
  antigravity:
    version: frontmatter
  factory:
    version: full
  windsurf:             # 31 additional agents supported
    version: simple
  cline:
    version: simple
registry:
  git: https://github.com/org/registry.git
  ref: main

CLI Commands

prs init                    # Initialize project
prs init --migrate          # Initialize + migration skills
prs compile                 # Compile to all targets
prs compile --watch         # Watch mode
prs validate --strict       # Validate syntax
prs import CLAUDE.md        # Import existing AI instructions
prs import --dry-run        # Preview import conversion
prs pull                    # Update registry
prs diff --target claude    # Show compilation diff

Output Targets

38 supported targets. Key examples:

TargetMain FileSkills
GitHub.github/copilot-instructions.md.github/skills/*/SKILL.md
ClaudeCLAUDE.md.claude/skills/*/SKILL.md
Cursor.cursor/rules/project.mdc.cursor/commands/*.md
Antigravity.agent/rules/project.md.agent/rules/*.md
FactoryAGENTS.md.factory/skills/*/SKILL.md,.factory/droids/*.md
OpenCodeOPENCODE.md.opencode/skills/*/SKILL.md
GeminiGEMINI.md.gemini/skills/*/skill.md
Windsurf.windsurf/rules/project.md.windsurf/skills/*/SKILL.md
Cline.clinerules.agents/skills/*/SKILL.md
Roo Code.roorules.roo/skills/*/SKILL.md
CodexAGENTS.md.agents/skills/*/SKILL.md
Continue.continue/rules/project.md.continue/skills/*/SKILL.md
+ 26 moreSee full list in documentation

Formatter Documentation

For detailed information about each formatter's output paths, supported features, quirks, and example outputs:

  • Full formatter reference: docs/reference/formatters/ (7 dedicated pages + index of all 37)
  • llms-full.txt: Available at the docs site root — contains all documentation in a single file for LLM consumption
  • Dedicated pages exist for: Claude Code, GitHub Copilot, Cursor, Antigravity, Factory AI, Gemini CLI, OpenCode
  • All 37 formatters indexed at: docs/reference/formatters/index.md with output paths, tier, and feature flags

Project Organization

Typical modular structure:

.promptscript/
  project.prs      # Entry: @meta, @inherit, @use, @identity, @agents
  context.prs      # @context (architecture, tech stack)
  standards.prs    # @standards (coding conventions)
  restrictions.prs # @restrictions (hard rules)
  commands.prs     # @shortcuts and @knowledge

The entry file uses @use./context, @use./standards, etc. to compose them.

Common Mistakes

  1. Missing @meta block - every.prs file needs @meta with id and syntax
  2. Multiple @inherit - only one per file; use @use for additional imports
  3. @extend without alias - requires prior @use... as alias
  4. Unquoted strings with special chars - quote strings containing :, #, {, }
  5. Forgetting to compile - .prs changes need prs compile to take effect
  6. Triple quotes inside triple quotes - not supported; describe content textually instead
  7. Using {{var}} in the root file without @inherit - template variables only work in a parent file that defines params in @meta, with values passed by the child via @inherit./parent(key: value) or @use./fragment(key: value). They are NOT set from promptscript.yaml or CLI flags

Migrating Existing AI Instructions to PromptScript

Automated: prs import

The fastest way to convert existing AI instructions to PromptScript:

prs import CLAUDE.md                    # Convert a single file
prs import .github/copilot-instructions.md
prs import AGENTS.md --output ./imported.prs
prs import --dry-run CLAUDE.md          # Preview without writing

prs import automatically:

  • Detects the source format (Claude, GitHub Copilot, Cursor, Factory, etc.)
  • Maps content to appropriate PromptScript blocks (@identity, @standards, etc.)
  • Generates a valid .prs file with @meta block
  • Preserves the original intent and structure

Supported source formats:

  • CLAUDE.md (Claude Code)
  • .github/copilot-instructions.md (GitHub Copilot)
  • .cursorrules or .cursor/rules/*.mdc (Cursor)
  • AGENTS.md (Factory AI / Codex)
  • .clinerules (Cline), .roorules (Roo Code)
  • .windsurf/rules/*.md (Windsurf)
  • Any Markdown-based AI instruction file

Manual Migration

For complex migrations or when prs import needs refinement:

Source PatternPromptScript Block
"You are..." persona text@identity
Project description, tech stack@context
Coding conventions, style rules@standards
"Never...", "Always...", hard rules@restrictions
/command definitions@shortcuts
Skill/tool definitions@skills
Agent/subagent configs@agents
Reference docs, API specs@knowledge

After import, split into modular files (context.prs, standards.prs, etc.) and compose with @use in project.prs. Run prs validate --strict then prs compile to verify output matches the original.

平台分布

Codex

35.41%
按下载量换算33

Claude

30.41%
按下载量换算29

Cursor

17.49%
按下载量换算16

Gemini CLI

9.22%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills