create-library
A guide for creating new Scheme libraries (R7RS) in the project.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
A guide for creating new Scheme libraries (R7RS) in the project.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
A guide for updating project documentation (CHANGES.md, Roadmap, etc.).
A guide for implementing new JavaScript primitives and exposing them to Scheme.
Guidelines for moving logic from JavaScript to Scheme (Schemification).
| name | Create Library |
| description | A guide for creating new Scheme libraries (R7RS) in the project. |
This skill guides you through adding a new Scheme environment/library to the project. This is the standard way to organize Scheme code.
src/core/scheme/ (for fundamental language features)src/extras/scheme/ (for extended functionality, interop, tools).sld)Create a .sld file (e.g., feature.sld) in the appropriate directory.
;; src/extras/scheme/feature.sld
(define-library (scheme-js feature)
(export
my-procedure
my-macro)
(import (scheme base))
;; Option A: Include implementation file (Preferred for larger logic)
(include "feature.scm")
;; Option B: Inline implementation (OK for very small libraries or simple re-exports)
;; (begin
;; (define (my-procedure x) ...))
)
.scm)If using (include "feature.scm"), create the corresponding .scm file in the same directory.
;; src/extras/scheme/feature.scm
;; Note: No (library ...) wrapper here, this code is included directly into the library body.
(define (my-procedure x)
(+ x 1))
(define-syntax my-macro
...)
tests/ mirroring the source structure (e.g., tests/extras/scheme/feature_tests.scm).(import (scheme base)
(scheme-js feature) ;; Import your new library
(scheme-js test)) ;; Import test framework
(test-group "Feature Tests"
(test "Description" expected-value expression)
;; ...
)
tests/tests.js (or test_manifest.js if applicable) so it runs with the suite.node run_tests_node.js