983 B
983 B
SKILL: Lisp Utils (org-skill-lisp-utils.org)
Overview
The Lisp Utils skill provides advanced structural and semantic validation for Common Lisp code.
Implementation
Package Context
(in-package :opencortex)
Validation Logic
(defun lisp-utils-validate (code &key (strict t))
"Performs deep validation of Lisp code strings."
(declare (ignore strict))
(handler-case
(let ((*read-eval* nil))
(with-input-from-string (s (format nil "(progn ~a)" code))
(loop for form = (read s nil :eof) until (eq form :eof)))
(list :status :success))
(error (c)
(list :status :error :reason (format nil "~a" c)))))
Skill Registration
(defskill :skill-lisp-utils
:priority 400
:trigger (lambda (ctx) (declare (ignore ctx)) nil))