You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are writing a standalone guide for an AI coding agent that will manually wrap arbitrary C libraries to Nim. The reader cannot see this repository and must not need it. Your job is to produce a self-containedSKILLS.md that teaches patterns, idioms, pitfalls, and provides examples.
Deliverable
Create/overwrite a single file: SKILLS.md (Markdown).
Hard constraints
No repository references: do not mention naylib, raylib, file paths, tools, configs, snippets, “evidence”, or grep instructions.
Manual wrapping only: assume the reader has only C headers/docs and Nim. No code generator assumptions.
Patterns and examples only: the guide must teach reusable idioms with generic examples (LIB_*, foo_*) and must be applicable to any C library.
Prompt 1 — LLM Judge: Evaluate candidate SKILLS.md files and pick the best
You are an expert judge evaluating multiple candidate SKILLS.md documents. These documents are meant to instruct an AI coding agent to manually wrap arbitrary C libraries into idiomatic Nim.
Inputs
You will be given N candidate documents: SKILLS_A.md, SKILLS_B.md, … (content pasted in full).
Non‑negotiable requirements the best guide must satisfy
The target reader:
must wrap C libraries manually (no generator assumptions)
cannot access any naylib/raylib repository files or implementation details
Therefore, the best SKILLS.md must:
be self-contained
be library-agnostic (no raylib-specific guidance)
avoid references to repo file paths, configs, “evidence”, grep steps, etc.
include actionable patterns/idioms, pitfalls, and examples
follow idiomatic Nim conventions (stdlib style mindset)
teach both ABI-correct raw bindings and ergonomic Nim wrappers
Your tasks
Summarize each candidate in 4–8 bullets:
what it teaches well
what it misses
who it would help/hurt (beginner vs advanced agent)
Score each candidate using this rubric (0–5 each; total /35):
Manual-wrapping focus (no generator/config framing)
Examples quality (generic C snippets + Nim raw + Nim ergonomic layer)
Pitfalls & debugging guidance
Advantages/Disadvantages table
Provide a table with columns: Candidate, Strengths, Weaknesses, Risks.
Best instructions extraction
Extract the best concrete instructions across all candidates:
“Top 15 rules” (short, imperative)
“Top 10 pitfalls + how to avoid them”
“Best example patterns to keep” (list the example themes)
Select the winner
Pick the single best candidate and justify why, referencing the rubric.
Provide an improvement plan
For the winner: list the top 10 edits that would make it excellent.
For the others: the top 3 salvageable parts from each.
Output format
Use this exact structure:
Overall verdict
Per-candidate summaries
Scores (rubric)
Advantages/Disadvantages table
Best instructions to carry forward
Winner + justification
Improvement plan
Be direct and specific. Do not be polite/fluffy. Focus on what will best instruct an AI agent to implement real wrappers.
Prompt 2 — LLM Judge: Synthesize a new SKILLS.md from the best ideas
You are now the author. You have reviewed multiple candidate SKILLS.md documents and extracted the best elements. Write a brand-new SKILLS.md that is the best possible standalone guide for an AI agent manually wrapping arbitrary C libraries into Nim.
Inputs
You will be provided:
The candidates SKILLS_A.md, SKILLS_B.md, … (full text)
Optionally: your own prior “best instructions to carry forward” notes
Hard constraints
Self-contained: do not reference any repository, raylib/naylib, configs, generator pipelines, or file paths.
Manual wrapping only.
Library-agnostic; use only generic library names (LIB_, foo_).
Must include concrete examples: C header snippet → raw Nim FFI → idiomatic Nim wrapper.
Must teach: naming, type mapping, ABI pragmas, ownership/lifetime, callbacks, error handling, testing, and pitfalls.
Must follow idiomatic Nim naming/style principles.
Required structure (use these headings)
Purpose
Two-Layer Wrapper Architecture (Raw FFI vs Idiomatic Layer)
Naming & API Design Rules (Idiomatic Nim)
FFI Mechanics: Pragmas, Linking, and Portability
C→Nim Type Mapping (Table + Notes)
Structs, Enums, Flags, and Constants
Function Binding Patterns (in/out params, buffers, strings)
Callbacks and User Data
Ownership, Lifetimes, and Resource Management
Error Handling Strategies
Testing & Verification Checklist
Common Pitfalls (and fixes)
Minimal Template to Start a New Wrapper (copy/paste scaffold)
Quality bar
Prioritize correctness and reproducibility over elegance.
Include “Do/Don’t” bullets.
Keep examples small but realistic (cover strings, buffers, resources, callbacks).
Provide a final concise checklist an agent can follow during implementation.
Output
Output only the final SKILLS.md content in Markdown. No commentary, no analysis, no mention of candidates.