Create a skills directory in the working directory
(work_dir: str)
| 27 | |
| 28 | |
| 29 | def create_skill_dir(work_dir: str) -> str: |
| 30 | """Create a skills directory in the working directory""" |
| 31 | skills_dir = os.path.join(work_dir, ".test_skills") |
| 32 | os.makedirs(skills_dir, exist_ok=True) |
| 33 | |
| 34 | # Create a skill subdirectory with SKILL.md |
| 35 | skill_subdir = os.path.join(skills_dir, "test-skill") |
| 36 | os.makedirs(skill_subdir, exist_ok=True) |
| 37 | |
| 38 | # Create a skill that instructs the model to include a specific marker in responses |
| 39 | skill_content = f"""--- |
| 40 | name: test-skill |
| 41 | description: A test skill that adds a marker to responses |
| 42 | --- |
| 43 | |
| 44 | # Test Skill Instructions |
| 45 | |
| 46 | IMPORTANT: You MUST include the exact text "{SKILL_MARKER}" somewhere in EVERY response you give. \ |
| 47 | This is a mandatory requirement. Include it naturally in your response. |
| 48 | """.replace("\r", "") |
| 49 | with open(os.path.join(skill_subdir, "SKILL.md"), "w", newline="\n") as f: |
| 50 | f.write(skill_content) |
| 51 | |
| 52 | return skills_dir |
| 53 | |
| 54 | |
| 55 | class TestSkillBehavior: |
no test coverage detected
searching dependent graphs…