scheme-library
Guide for writing, organizing, and refactoring Scheme libraries for the Sagittarius environment.
Install
mkdir -p .claude/skills/scheme-library && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10656" && unzip -o skill.zip -d .claude/skills/scheme-library && rm skill.zipInstalls to .claude/skills/scheme-library
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guide for developing Scheme libraries for Sagittarius. Use this when creating or modifying Scheme libraries in sitelib/, implementing SRFI, or adding new utility libraries.Key capabilities
- →Create utility libraries
- →Implement SRFI libraries
- →Refactor Scheme code
- →Add library features
How it works
Provides directory structure and coding standards for developing libraries in Sagittarius.
Inputs & outputs
When to use scheme-library
- →Create utility library
- →Implement SRFI
- →Refactor Scheme code
- →Add features to existing libraries
About this skill
Scheme Library Development Guide
This guide provides best practices for developing Scheme libraries for Sagittarius.
When to Use
- Creating new utility libraries in
sitelib/ - Implementing SRFI libraries
- Refactoring existing libraries
- Adding features to existing libraries
Directory Selection
| Directory | Purpose | Dependencies |
|---|---|---|
lib/ | Core/builtin libraries (rnrs, core, clos) | No sitelib or ext dependencies |
sitelib/ | Utility libraries (srfi, rfc, text, util) | Can depend on lib and other sitelib |
ext/*/sagittarius/ | Extension libraries with C bindings | Can depend on lib only (with exceptions) |
Library Structure
File Header
;;; -*- mode:scheme; coding:utf-8 -*-
;;;
;;; library/name.scm - Brief description
;;;
;;; Copyright (c) YYYY Author Name <[email protected]>
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer.
;;;
;;; 2. Redistributions in binary form must reproduce the above copyright
;;; notice, this list of conditions and the following disclaimer in the
;;; documentation and/or other materials provided with the distribution.
;;;
;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
;;; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
;;; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
;;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
;;; TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
;;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
;;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;
Library Form
#!nounbound
(library (library-path name)
(export procedure-1
procedure-2
<class-name>
+constant+)
(import (rnrs)
(other dependencies))
;; Library implementation
)
File Naming
- Library
(text json)→ filesitelib/text/json.scm - SRFI
(srfi :64 testing)→ filesitelib/srfi/%3a64/testing.scm- Note:
:is encoded as%3ain filenames
- Note:
Testing
Test File Location
Test files mirror library structure under test/tests/:
sitelib/json.scm→test/tests/json.scmsitelib/text/json.scm→test/tests/text/json.scm
Test Template
;; -*- mode:scheme; coding:utf-8; -*-
(import (rnrs)
(library-to-test)
(srfi :64 testing))
(test-begin "Library name tests")
;; Group related tests
(test-equal "description" expected actual)
(test-assert "description" expression)
(test-error "description" condition-type expression)
(test-end)
Running Tests
# Run specific test
./build/sagittarius -Llib -Lsitelib -L'ext/*' -Dbuild \
test/runner.scm test/tests/your-test.scm
# Run via ctest
ctest --output-on-failure -R pattern
SRFI Implementation
R7RS-style SRFI Libraries
SRFI libraries should support both R6RS and R7RS naming:
;; sitelib/srfi/%3a99/records.scm
(library (srfi :99 records)
(export ...)
(import ...)
...)
After adding, run the SRFI generator:
./dist.sh srfi
This generates R7RS-style wrappers in lib/scheme/.
Documentation
Add documentation in doc/utils/ following the project's scribble-like format:
[§2] (library name) - Brief description
---------------------------------------
Brief overview of the library purpose.
###### [!Library] `(library name)`
Library description.
###### [!Function] `(procedure arg1 arg2)`
Describe function behavior and return value.
- _arg1_: Parameter description
- _arg2_: Parameter description
Checklist
Before submitting:
- Library follows naming conventions
- Copyright header present
- Export list is complete and sorted
- Test file created with adequate coverage
- Documentation added (if user-facing)
-
ctest --output-on-failurepasses - Dependencies respect directory constraints
When not to use it
- →Non-Sagittarius projects
Prerequisites
Limitations
- →Requires specific copyright header
- →Dependencies restricted by directory
How it compares
Enforces strict library organization and copyright headers for Sagittarius compatibility.
Compared to similar skills
scheme-library side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| scheme-library (this skill) | 0 | 4mo | Review | Intermediate |
| deepwiki-rs | 25 | 9mo | Review | Intermediate |
| codex-cli-bridge | 9 | 9mo | Review | Intermediate |
| skill-development | 17 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
deepwiki-rs
sopaco
AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-development
anthropics
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
skill-writer
pytorch
Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.
openapi-spec-generation
wshobson
Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.
korean-skill-creator
clwmfksek
한글 기반 클로드 스킬 자동 생성 도구. 사용자가 "클로드 스킬을 만들어줘" 또는 "[요구사항] 스킬 만들어줘"라고 요청할 때 사용. Progressive disclosure 원칙을 따르는 한글 문서 구조(SKILL.md + references/)를 자동으로 생성하고, 실전 예시를 포함한 일관성 있는 스킬 템플릿을 제공.