verify-docs-swift

Generate a Swift test suite from docs-db YAML code blocks and compile with xcodebuild.

Updated Aug 27, 2026
Ready to run
npx skills add https://github.com/transistorsoft/docforge --skill verify-docs-swift
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: verify-docs-swift
Source: https://github.com/transistorsoft/docforge/tree/main/skills/verify-docs-swift
Command: npx skills add https://github.com/transistorsoft/docforge --skill verify-docs-swift

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Swift code examples in docs-db YAML files sometimes fail to compile, and this skill automates validating those examples by generating a Swift test suite and compiling it to ensure correctness.

Core Features & Use Cases

  • Extracts swift blocks from docs-db/*.yaml and generates a compilable test file.
  • Builds the test target to verify every Swift example.
  • Reports which examples pass or fail, guiding corrections to doc samples.

Quick Start

Run scripts/generate_docs_compile_test_swift.py to generate tests, then build the DemoApp2 target with xcodebuild to verify all Swift code blocks compile.

Frequently Asked Questions about verify-docs-swift

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify that Swift code examples in YAML documentation files actually compile?▼

To verify Swift code examples in YAML files, you can generate a dedicated test suite that extracts swift blocks and compiles them using xcodebuild to ensure correctness. This process automates validation by creating a DocsExamplesCompileTest.swift file from your docs-db entries.

What is the best way to automate testing for Swift code samples stored in docs-db YAML entries?▼

The best way to automate testing for Swift code samples in docs-db YAML is running a Python script to extract code blocks and generate a compilable test file. You then build the DemoApp2 target with xcodebuild to validate every example.

Does this automated Swift docs compilation test require specific Xcode targets or dependencies?▼

Yes, the automated Swift docs compilation test specifically targets the DemoApp2 Swift test build using xcodebuild. It relies on a Python script to handle top-level Task wrappers and BGGeo imports during the extraction process.

How do I generate a compile test for Swift documentation blocks step by step?▼

To generate a compile test for Swift documentation blocks, run scripts/generate_docs_compile_test_swift.py to extract swift blocks from YAML files. This creates DocsExamplesCompileTest.swift, which you then build to verify all code samples.

What limitations exist when validating Swift code blocks with automated test generation?▼

A key limitation of validating Swift code blocks with automated test generation is that it specifically handles top-level Task wrappers and BGGeo imports. It applies only to docs-db YAML entries and requires building the DemoApp2 target.