بنقرة واحدة
add-app-skill
Scaffold a new skill in an existing app (BaseSkill, schemas, app.yml, i18n)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Scaffold a new skill in an existing app (BaseSkill, schemas, app.yml, i18n)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create a pull request from dev to main with proper formatting and draft release
Create a pull request from dev to main with proper formatting and draft release
Create a draft GitHub release with proper versioning and release notes
Create a well-structured task with smart field suggestions; GitHub Issues by default, Linear only for retained internal categories
Create a well-structured task with smart field suggestions; GitHub Issues by default, Linear only for retained internal categories
Start an iOS/macOS Apple app development or web-parity audit session — loads design rules, maps web sources to native code, supports Linux static audits, and verifies with Xcode when available
| name | add-app-skill |
| description | Scaffold a new skill in an existing app (BaseSkill, schemas, app.yml, i18n) |
| user-invocable | true |
| argument-hint | <appId> <skillId> <SkillClassName> |
Parse $ARGUMENTS into three parts:
appId — app directory name (e.g., web, news, travel)skillId — kebab-case skill identifier (e.g., deep-research)SkillClassName — PascalCase class name (e.g., DeepResearchSkill)If any are missing, ask the user before proceeding.
You are adding a new skill to an existing app microservice. This touches backend Python code, YAML config, and i18n.
Read these files to understand the app's patterns:
backend/apps/{appId}/app.yml — existing skills, embed types, categoriesbackend/apps/base_skill.py (lines 1-145) — BaseSkill interfacebackend/apps/{appId}/skills/ — use as templatebackend/shared/python_schemas/app_metadata_schemas.py — AppYAML schema (for valid field names)Before scaffolding a new app skill, run specify or create an inline spec using
docs/contributing/guides/spec-driven-development.md.
New app skills usually require a full spec because they define user-facing AI behavior, tool contracts, provider behavior, and often embed behavior. The spec must include:
Create backend/apps/{appId}/skills/{skill_file}.py where skill_file is skillId with hyphens replaced by underscores.
Follow this structure exactly:
"""
{SkillClassName} — {brief description}.
Architecture: docs/architecture/app_skills.md
"""
import logging
from typing import Dict, Any, Optional
from pydantic import BaseModel, Field
from backend.apps.base_skill import BaseSkill
logger = logging.getLogger(__name__)
class {SkillName}Request(BaseModel):
"""{description}."""
# Define input fields from tool_schema
class {SkillName}Response(BaseModel):
"""{description}."""
success: bool = Field(default=False)
# Define output fields
class {SkillClassName}(BaseSkill):
"""
{Description of what this skill does}.
"""
async def execute(
self,
# Skill-specific params (must match tool_schema properties)
secrets_manager=None,
cache_service=None,
encryption_service=None,
directus_service=None,
user_id: Optional[str] = None,
chat_id: Optional[str] = None,
**kwargs
) -> {SkillName}Response:
"""Execute the skill."""
try:
# Implementation here
return {SkillName}Response(success=True)
except Exception as e:
logger.error(f"{SkillClassName} error: {e}", exc_info=True)
return {SkillName}Response(success=False, error=str(e))
Add to the skills: list in backend/apps/{appId}/app.yml:
- id: {skillId}
name_translation_key: {appId}.{skill_id_underscored}
description_translation_key: {appId}.{skill_id_underscored}.description
icon_image: {icon}.svg
preprocessor_hint: >
Natural language description for AI model routing
stage: development
providers:
- name: OpenMates
no_api_key: true
class_path: backend.apps.{appId}.skills.{skill_file}.{SkillClassName}
tool_schema:
type: object
properties:
# Define input parameters
required:
# List required params
If the skill produces embeds, also add an embed_types: entry.
Add skill name and description to frontend/packages/ui/src/i18n/sources/skills.yml (all 20 locales).
Then rebuild:
cd frontend/packages/ui && npm run build:translations
Every new app skill must include app-store examples so the skill details page can show realistic preview cards.
If the skill produces embeds:
frontend/packages/ui/src/components/embeds/{appId}/{SkillName}EmbedPreview.examples.ts next to the preview component.query_translation_key values under settings.app_store_examples.{appId}.{skill_id_underscored}.<n>.frontend/packages/ui/src/i18n/sources/settings/app_store_examples.yml.If the skill does not produce embeds, add equivalent user-facing examples in backend/apps/{appId}/app.yml using the existing example_entries or example_translation_keys pattern for that app.
If scripts/test_skills/ exists, create test_{skill_id_underscored}.py following the pattern of other test scripts in that directory.
Ask the user: "Does this skill produce embeds that need a frontend component?"
If yes, suggest running /add-embed-type {appId} {skillId} {SkillName} next.
BaseSkill or backend/shared/execute() params must match tool_schema.properties names exactlylogger = logging.getLogger(__name__) — never print()PascalCase — end request models with Request, response with Responsestage; implemented skills are enabled by default unless default_enabled: false is explicitly needed