sno-ai/sno-station-skills / skills/R-recursive-self-improvement/rem-reflect/skill
rem-reflect
VerifiedSelf Learning from this machine's Claude Code, Codex, Hermes, OpenClaw and Cursor sessions. Decide skill changes and lessons with accept/reject/tbd; recall lessons at session start.
scripts/local-settings.ts
View on GitHubimport { existsSync, readFileSync } from 'node:fs';
import { join } from 'node:path';
import { isObject, paths } from './config.ts';
import { writeJson } from './store.ts';
export interface LocalSettings {
version: string;
labeler_input_max_chars: number;
labeler_event_window_lines: number;
recall_timeout_ms: number;
}
function checked(value: unknown): LocalSettings {
if (!isObject(value) || typeof value.version !== 'string' || !value.version
|| !['labeler_input_max_chars', 'labeler_event_window_lines', 'recall_timeout_ms']
.every(key => Number.isInteger(value[key]) && Number(value[key]) > 0)) {
throw new Error('local settings: invalid response');
}
return value as unknown as LocalSettings;
}
export function loadLocalSettings(store: string, log: string[]): LocalSettings {
const stored = join(store, 'settings.local.json');
const path = existsSync(stored) ? stored : join(paths.references, 'local-settings.json');
const settings = checked(JSON.parse(readFileSync(path, 'utf8')));
log.push(`local settings: ${path === stored ? 'store' : 'shipped'} version ${settings.version}`);
return settings;
}
export function saveLocalSettings(store: string, response: unknown): void {
if (!isObject(response) || !isObject(response.local) || typeof response.settings_version !== 'string') return;
writeJson(join(store, 'settings.local.json'), checked({ version: response.settings_version, ...response.local }));
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |