Swift compiler inspection workflow
Skill gaelic-ghost/socket/plugins/swift-lang/skills/swift-compiler-inspection-workflow
Inspect Swift toolchain selection, driver jobs, diagnostics, AST, SIL, LLVM IR, dependencies, modules, and interfaces. Use for compiler behavior, lowering, build-job, or emitted-artifact investigations.From its SKILL.md
npx -y skills add gaelic-ghost/socket --skill swift-compiler-inspection-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.4 KB, 624 tokens by cl100k_base, as published. Nobody here has run it
Swift Compiler Inspection Workflow
Inspect the Swift compilation pipeline while distinguishing supported driver behavior from version-sensitive compiler internals.
Workflow
- Inspect repository guidance and determine whether SwiftPM, Xcode, another build system, or a standalone compiler invocation owns the real build.
- Resolve toolchain ownership:
- inspect Swiftly with
swiftly use --print-locationandswift --version - inspect Xcode with
xcode-select -p,xcrun --find swiftc, andxcrun swiftc --version - choose the owner matching the actual build and keep all compiler, SDK, plugin, and module paths within it
- inspect Swiftly with
- Reproduce the narrowest compiler phase that answers the question:
- parse
- type check
- print driver jobs
- dependency scan
- emit or inspect AST
- emit SIL or LLVM IR
- emit module, interface, or diagnostics
- Run experiments against copied or temporary inputs unless the user asked to change the repository.
- Capture the complete command, toolchain identity, target triple, SDK, language mode, conditional flags, module paths, and relevant environment.
- Classify every surface using references/compiler-surfaces.md: supported CLI, version-sensitive diagnostic surface, or compiler-internal surface.
- Compare artifacts only across intentionally matched configurations.
- Hand full package or Xcode builds and tests to their owning workflow.
Driver Boundary
- Treat
swiftandswiftcas compiler-driver entry points that plan and coordinate frontend and linker jobs. - Treat
swift-driveras the driver implementation, not a second compiler frontend. - Prefer driver options over invoking
swift-frontenddirectly. - Use
swift-frontendonly when a documented compiler-development workflow or unavailable driver surface requires it, and label the command internal and version-sensitive.
Toolchain Contract
- Use Swiftly-selected toolchains for Swift.org release or snapshot comparison, cross-platform compiler behavior, and
.swift-version-controlled repositories. - Use Xcode-selected tools through
xcrunfor Apple SDK imports, Xcode build reproduction, Xcode-bundled SourceKit behavior, and Apple target triples. - Do not combine Swiftly's compiler with Xcode's private toolchain libraries or combine Xcode's compiler with Swiftly's host plugins.
- Recognize
swiftly use xcodeas a proxy into the selected Xcode toolchain and record both selectors.
Output
Return the question, selected compiler phase, toolchain owner and version, exact invocation, artifact stability class, result, and limitations.
Guardrails
- Do not claim compiler dump formats are stable interchange formats.
- Do not infer optimizer or runtime behavior from a Debug-only or parse-only artifact.
- Do not omit compiler arguments when reproducing a type-check or module failure.
- Do not run multiple SwiftPM or Xcode compiler validations concurrently.
- Do not mutate the global Swiftly or Xcode selection for inspection alone.
What ships with it: 2 files
2.3 KB alongside SKILL.md
agents/
- openai.yaml276 B
references/
- compiler-surfaces.md2.1 KB