Skip to content

Adonis0123/adonis-skills / .agents/skills/repo-skill-creator

repo-skill-creator

Verified

Create and maintain repository skills for adonis-skills. Use when users ask to scaffold a new skill under skills/, generate agents/openai.yaml, run skill validation, refresh web index data, or standardize the skill authoring workflow.

scripts/test_init_skill.py

View on GitHub
"""Exercise author serialization through the real initializer CLI."""

import os
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path

import yaml


class InitializerAuthorTests(unittest.TestCase):
    def initialize(self, author):
        with tempfile.TemporaryDirectory(prefix="skill-author-test-") as directory:
            skill_dir = Path(directory) / "author-example"
            result = subprocess.run(
                [
                    sys.executable,
                    str(Path(__file__).with_name("init_skill.py")),
                    "author-example",
                    "--path", directory,
                    "--author", author,
                ],
                capture_output=True,
                text=True,
                env={**os.environ, "PYTHONDONTWRITEBYTECODE": "1"},
            )
            self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
            content = (skill_dir / "SKILL.md").read_text()
            frontmatter = yaml.safe_load(content.split("---", 2)[1])
            self.assertEqual(frontmatter["metadata"]["author"], author)
            self.assertEqual(set(frontmatter), {"name", "description", "metadata"})
            self.assertEqual(set(frontmatter["metadata"]), {"author"})
            self.assertTrue((skill_dir / "agents" / "openai.yaml").is_file())

    def test_plain_author_round_trip(self):
        self.initialize("Platform Team")

    def test_unicode_control_author_round_trip(self):
        for author in ("Team\u0085Name", "Team\u007fName", "Team\u009fName"):
            with self.subTest(author=author):
                self.initialize(author)

    def test_unicode_scalar_author_round_trip(self):
        for author in (
            "Team 🦉",
            "Team 𠮷",
            "Line\u2028Separator",
            "Paragraph\u2029Separator",
            "Team\uffffName",
            ("Long author " * 30) + "End",
        ):
            with self.subTest(author=author):
                self.initialize(author)

    def test_yaml_sensitive_author_round_trip(self):
        for author in (
            "Platform #1",
            "Platform: Tools",
            '"Quoted Team"',
            "O'Connor",
            "Line one\nLine two",
            "Team\nextra: injected",
            "true",
            r"Team\Tools",
            "研发 #1",
        ):
            with self.subTest(author=author):
                self.initialize(author)


if __name__ == "__main__":
    unittest.main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall