coding — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited coding (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
How Appies write code
Guidelines and prompts for writing high-quality, maintainable code.
// ❌ Clever
const x = data.reduce((a,b)=>({...a,[b.k]:b.v}),{});
// ✅ Clear
const result = {};
data.forEach(item => {
result[item.key] = item.value;
});// ❌ Magic
const users = await db.get('users');
// ✅ Clear
const users = await database.users.findAll({
where: { active: true },
limit: 100
});// Always handle errors
try {
const result = await riskyOperation();
return { ok: true, result };
} catch (error) {
console.error('Operation failed:', error.message);
return { ok: false, error: error.message };
}Before committing code, check:
When writing code, follow this structure:
What problem am I solving?
What are the inputs?
What are the outputs?
What are the edge cases?# Find similar implementations
grep -r "similar_function" .
# Read before reimplementing// Start with the simplest solution
function processData(data) {
// Basic happy path
if (!data) return null;
return data.map(item => item.value);
}function processData(data) {
if (!data) {
console.error('processData: data is required');
return { ok: false, error: 'Data required' };
}
try {
const result = data.map(item => {
if (!item.value) throw new Error('Missing value');
return item.value;
});
return { ok: true, result };
} catch (error) {
console.error('processData failed:', error.message);
return { ok: false, error: error.message };
}
}// What if...
processData(null); // null input
processData([]); // empty array
processData([{value: 1}]); // valid input
processData([{}]); // missing value/**
* Process data array and extract values
* @param {Array<{value: any}>} data - Array of objects with value property
* @returns {{ok: boolean, result?: any[], error?: string}}
*/
function processData(data) {
// ...
}async function apiRequest(url, options = {}) {
try {
const response = await fetch(url, {
headers: { 'Content-Type': 'application/json' },
...options
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
const data = await response.json();
return { ok: true, data };
} catch (error) {
return { ok: false, error: error.message };
}
}const fs = require('fs').promises;
async function readJsonFile(path) {
try {
const content = await fs.readFile(path, 'utf8');
const data = JSON.parse(content);
return { ok: true, data };
} catch (error) {
if (error.code === 'ENOENT') {
return { ok: false, error: 'File not found' };
}
return { ok: false, error: error.message };
}
}async function retryOperation(fn, maxRetries = 3, delay = 1000) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (i === maxRetries - 1) throw error;
await new Promise(resolve => setTimeout(resolve, delay * (i + 1)));
}
}
}// Validate and sanitize
function validateEmail(email) {
if (typeof email !== 'string') return false;
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return regex.test(email.trim());
}// ❌ Never
const hardcodedApiKeyExample = '<api-key>'; // example only, never do this
// ✅ Always
const apiKey = process.env.API_KEY;
if (!apiKey) throw new Error('API_KEY not set');const path = require('path');
function safePath(userInput) {
// Prevent directory traversal
const normalized = path.normalize(userInput);
const base = '/allowed/directory';
const full = path.join(base, normalized);
if (!full.startsWith(base)) {
throw new Error('Invalid path');
}
return full;
}// test.js
const assert = require('assert');
function testProcessData() {
// Test valid input
const result1 = processData([{value: 1}, {value: 2}]);
assert.strictEqual(result1.ok, true);
assert.deepStrictEqual(result1.result, [1, 2]);
// Test null input
const result2 = processData(null);
assert.strictEqual(result2.ok, false);
// Test empty array
const result3 = processData([]);
assert.strictEqual(result3.ok, true);
assert.strictEqual(result3.result.length, 0);
console.log('✅ All tests passed');
}
testProcessData();// Minimal test case
const input = { ... };
const output = buggyFunction(input);
console.log('Expected:', expectedOutput);
console.log('Got:', output);// Add logging
function buggyFunction(input) {
console.log('Input:', JSON.stringify(input, null, 2));
const step1 = processStep1(input);
console.log('After step1:', step1);
const step2 = processStep2(step1);
console.log('After step2:', step2);
return step2;
}// Change only what's broken
// - const result = buggyLogic(input);
+ const result = fixedLogic(input);# Run tests
node test.js
# Check in real environment
curl http://localhost:3000/api/endpointBefore pushing code, ask:
// ❌ Over-engineered
const cache = new LRU({ max: 1000, ttl: 60000 });
function getUser(id) {
return cache.get(id) || (cache.set(id, db.get(id)), cache.get(id));
}
// ✅ Simple (optimize later if needed)
function getUser(id) {
return db.get(id);
}// ❌ What is 86400000?
setTimeout(cleanup, 86400000);
// ✅ Clear
const ONE_DAY_MS = 24 * 60 * 60 * 1000;
setTimeout(cleanup, ONE_DAY_MS);// ❌ Nested hell
if (user) {
if (user.subscription) {
if (user.subscription.active) {
return user.subscription.plan;
}
}
}
// ✅ Early returns
if (!user) return null;
if (!user.subscription) return null;
if (!user.subscription.active) return null;
return user.subscription.plan;frameworks/gsd/ - Productivity systemSOUL.md - Code quality principles"Good code is boring code."
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.