Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

add_platform.implement

БесплатноБез исполняемых скриптовНе проверен

Creates platform adapter, templates, tests with 100% coverage, and README documentation. Use after adding hook capabilities.

diegosouzapwот diegosouzapw★ 68 звёзд на GitHub

Об этом скилле

add_platform.implement

Step 3/4 in integrate workflow

Full workflow to integrate a new AI platform into DeepWork

Adds a new AI platform to DeepWork with adapter, templates, and tests. Use when integrating Cursor, Windsurf, or other AI coding tools.

Prerequisites (Verify First)

Before proceeding, confirm these steps are complete:

  • /add_platform.research
  • /add_platform.add_capabilities

Instructions

Goal: Creates platform adapter, templates, tests with 100% coverage, and README documentation. Use after adding hook capabilities.

Implement Platform Support

Objective

Create the complete platform implementation including the adapter class, command templates, comprehensive tests, and documentation updates.

Task

Build the full platform support by implementing the adapter, creating templates, writing tests with 100% coverage, and updating the README.

Prerequisites

Read the outputs from previous steps:

  • doc/platforms/<platform_name>/cli_configuration.md - For template structure
  • src/deepwork/schemas/job_schema.py - For current schema
  • src/deepwork/adapters.py - For adapter patterns

Also review existing implementations for reference:

  • src/deepwork/templates/claude/ - Example templates
  • tests/ - Existing test patterns

Process

  1. Create the platform adapter class

    Add a new adapter class to src/deepwork/adapters.py:

    class NewPlatformAdapter(PlatformAdapter):
        """Adapter for <Platform Name>."""
    
        platform_name = "<platform_name>"
        command_directory = "<path to commands>"  # e.g., ".cursor/commands"
        command_extension = ".md"  # or appropriate extension
    
        def get_hook_support(self) -> dict:
            """Return which hooks this platform supports."""
            return {
                "stop_hooks": True,  # or False/None
                # ... other hooks
            }
    
        def generate_command(self, step: StepDefinition, job: JobDefinition) -> str:
            """Generate command file content for this platform."""
            # Use Jinja2 template
            template = self.env.get_template(f"{self.platform_name}/command.md.j2")
            return template.render(step=step, job=job)
    
  2. Create command templates

    Create templates in src/deepwork/templates/<platform_name>/:

    • command.md.j2 - Main command template
    • Any other templates needed for the platform's format

    Use the CLI configuration documentation to ensure the template matches the platform's expected format.

  3. Register the adapter

    Update the adapter registry in src/deepwork/adapters.py:

    PLATFORM_ADAPTERS = {
        "claude": ClaudeAdapter,
        "<platform_name>": NewPlatformAdapter,
        # ... other adapters
    }
    
  4. Write comprehensive tests

    Create tests in tests/ that cover:

    • Adapter instantiation
    • Hook support detection
    • Command generation
    • Template rendering
    • Edge cases (empty inputs, special characters, etc.)
    • Integration with the sync command

    Critical: Tests must achieve 100% coverage of new code.

  5. Update README.md

    Add the new platform to README.md:

    • Add to "Supported Platforms" list
    • Add installation instructions:
      deepwork install --platform <platform_name>
      
    • Document any platform-specific notes or limitations
  6. Run tests and verify coverage

    uv run pytest --cov=src/deepwork --cov-report=term-missing
    
    • All tests must pass
    • New code must have 100% coverage
    • If coverage is below 100%, add more tests
  7. Iterate until tests pass with full coverage

    This step has a stop_hooks script that runs tests. Keep iterating until:

    • All tests pass
    • Coverage is 100% for new functionality

Output Format

templates/

Location: src/deepwork/templates/<platform_name>/

Create the following files:

command.md.j2:

{# Template for <platform_name> command files #}
{# Follows the platform's expected format from cli_configuration.md #}

[Platform-specific frontmatter or metadata]

# {{ step.name }}

{{ step.description }}

## Instructions

{{ step.instructions_content }}

[... rest of template based on platform format ...]

tests/

Location: tests/test_<platform_name>_adapter.py

"""Tests for the <platform_name> adapter."""
import pytest
from deepwork.adapters import NewPlatformAdapter

class TestNewPlatformAdapter:
    """Test suite for NewPlatformAdapter."""

    def test_adapter_initialization(self):
        """Test adapter can be instantiated."""
        adapter = NewPlatformAdapter()
        assert adapter.platform_name == "<platform_name>"

    def test_hook_support(self):
        """Test hook support detection."""
        adapter = NewPlatformAdapter()
        hooks = adapter.get_hook_support()
        assert "stop_hooks" in hooks
        # ... more assertions

    def test_command_generati
Полный SKILL.md на GitHub

Установить add_platform.implement в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл add_platform.implement?

Creates platform adapter, templates, tests with 100% coverage, and README documentation. Use after adding hook capabilities.

Как установить скилл add_platform.implement?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл add_platform.implement запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить add_platform.implement с