Branchwell

Skillfarm / website · skillfarm.ai / commits / a4acba8f

[skillfarm] BioLock-only sign-in and plain-word skill cards new

Sign-in is BioLock only: WebAuthn with the device's own reader (platform
attachment, user verification and a resident key required). GitHub and
Google sign-in, their routes, buttons, copy and secret use are removed.
Settings lists BioLock devices, adds one on this device, and makes a
one-time link for another device. scripts/biolock-link.sh makes a link
for an existing account. oauth_accounts is kept so older data stays keyed.

Skill cards use plain words: migration 0018 rewrites titles, makers,
summaries and pick notes with no outside company, product or person
names; savePick refuses those names; pick pages drop the outside repo
name, the credit line and the repo name in star labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Pushed by atom-backup to main 1 hour ago · written by protomota · a4acba8fed02ff053e24fa2ab137b32f1b601fa1 · parent 154cbccf

29 files changed

README.md changed

5252 | Secret | Used for |
5353 |---|---|
5454 | `SESSION_SECRET` | Signing cookies. Any random string of 32 or more characters. |
55- | `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET` | GitHub sign-in and star counts. Callback: `https://skillfarm.ai/auth/github/callback` |
56- | `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` | Google sign-in. Callback: `https://skillfarm.ai/auth/google/callback` |
5755 | `ANTHROPIC_API_KEY` | The AI review of each submission |
5856 | `RESEND_API_KEY` | Email notices. The `EMAIL_FROM` domain must be verified in Resend. |
5957
6058 The site runs with any of these missing: the matching feature shows as "being set up" and `/admin` → System lists what is configured.
6159
62- Admins are the GitHub account ids in `ADMIN_GITHUB_IDS` (`wrangler.jsonc`). The flag is applied when that account signs in with GitHub.
60+ Sign-in is BioLock only: each device's own fingerprint or face reader (WebAuthn, built-in readers only, user verification required). No passwords and no outside sign-in providers. Admins are users with `is_admin = 1`. To add BioLock to an existing account that has no device yet (such as the site owner's Sprout account), run `scripts/biolock-link.sh <handle>` and open the one-time link it prints on that device.

migrations/0018_plain_card_words.sql added

1+ -- Card words in plain language: no outside company, product or person names in titles, makers, summaries or pick notes.
2+ UPDATE skills SET title = 'Security Research Skills', maker = 'a security firm', summary = 'Skills for security research, finding vulnerabilities and running audits.', pick_note = 'A roundup I read recommends it. These are the workflows a security firm publishes for its own work.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'trail-of-bits-skills';
3+ UPDATE skills SET title = 'Security Audit', maker = 'a cloud company', summary = 'A multi-phase security audit for coding agents, with independently verified findings in a machine-readable report.', pick_note = 'I found it in a roundup of the most starred skill repos.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'security-audit';
4+ UPDATE skills SET title = 'Skills Command Line', maker = 'a web hosting company', summary = 'The open command-line tool behind "npx skills": find, add and remove agent skills from public repos.', pick_note = 'Many of the install commands on these pages use it, so it is worth knowing.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'skills-cli';
5+ UPDATE skills SET title = 'Two-Agent Plan Loop', maker = 'an independent developer', summary = 'Hardens a plan in four phases before any code is written, with two different agents checking each other''s work.', pick_note = 'Our team uses this one. Parts of it are adapted from another developer''s skills, and the repo says which.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'claudex-loop';
6+ UPDATE skills SET title = 'Skill Creator', maker = 'an AI lab', summary = 'A guided way to build a new skill of your own.', pick_note = 'Start here if you want to write a skill and share it on Skillfarm.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'skill-creator';
7+ UPDATE skills SET title = 'Caveman', maker = 'an independent developer', summary = 'Makes a coding agent use fewer tokens: shorter answers and smaller tool output, with every original recoverable.', pick_note = 'I found it in a roundup of the most starred skill repos. Worth a look if your sessions run long.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'caveman';
8+ UPDATE skills SET title = 'Planning with Files', maker = 'an independent developer', summary = 'Keeps an agent''s plan in Markdown files, so a long task survives a cleared or compacted session.', pick_note = 'A roundup I read recommends it. Plans kept in files are easy for you to read and correct, too.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'planning-with-files';
9+ UPDATE skills SET title = 'Deploy to a Web Host', maker = 'an AI lab', summary = 'Deploys an app or site to a popular web hosting service from your agent.', pick_note = 'Our team uses this one. Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'vercel-deploy';
10+ UPDATE skills SET title = 'Hosted Database Skills', maker = 'a database company', summary = 'Skills for building on a hosted database platform, including good practice for SQL databases.', pick_note = 'These come from the platform''s own team, and it points its users to them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'supabase-agent-skills';
11+ UPDATE skills SET title = 'Infrastructure as Code Skills', maker = 'an infrastructure tools company', summary = 'Skills and plugins for infrastructure tools, including a style guide for infrastructure code.', pick_note = 'A roundup I read recommends it. It comes from the company that makes the tools.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'hashicorp-agent-skills';
12+ UPDATE skills SET title = 'Cloud Platform Skills', maker = 'a cloud company', summary = 'Teaches agents how to build on a large cloud and edge platform.', pick_note = 'These come from the platform''s own team, so they follow how it is meant to be used.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'cloudflare-skills';
13+ UPDATE skills SET title = 'GPU Cloud', maker = 'a GPU cloud company', summary = 'A plugin with skills and a hosted MCP server for managing cloud GPU machines, serverless endpoints, templates and volumes.', pick_note = 'Our team uses this one. It comes from the company itself, so it tracks the current API.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'runpod';
14+ UPDATE skills SET title = 'Model Hub Skills', maker = 'an open AI model hub', summary = 'Gives an agent the tools of a large open model hub, including its command line.', pick_note = 'Useful when your work touches open models and datasets.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'hugging-face-skills';
15+ UPDATE skills SET title = 'Database Skills', maker = 'a database company', summary = 'Skills for agents working with databases: SQL schema design, indexing and migrations.', pick_note = 'A roundup I read recommends it. It comes from a company that runs databases for a living.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'database-skills';
16+ UPDATE skills SET title = 'Local Analytics Database', maker = 'a database project', summary = 'Skills for agents that query and explore data with a fast local analytics database.', pick_note = 'A small repo, and a direct route to analysing files without setting up a database server.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'duckdb-skills';
17+ UPDATE skills SET title = 'Scientific Agent Skills', maker = 'a science software company', summary = 'A library of skills for scientific work. The maker lists 177 skills and more than 100 scientific databases.', pick_note = 'Two roundups I read recommend it. It is the largest science collection I found.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'scientific-agent-skills';
18+ UPDATE skills SET title = 'Last 30 Days', maker = 'an independent developer', summary = 'Researches any topic across forums, social sites, video sites, news and the web, then writes a grounded summary of the last 30 days.', pick_note = 'Our team uses this one. Two roundups I read recommend it as well.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'last30days';
19+ UPDATE skills SET title = 'Marketing Skills', maker = 'a marketing consultant', summary = 'Marketing skills for agents: conversion, copywriting, SEO, analytics and growth engineering.', pick_note = 'Two roundups I read recommend it. It is the most complete marketing set I found.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'marketing-skills';
20+ UPDATE skills SET title = 'Notes Vault Skills', maker = 'a notes app maker', summary = 'Teaches an agent to work in a Markdown notes vault and its open formats.', pick_note = 'They are a good fit if your notes live in a folder of Markdown files.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'obsidian-skills';
21+ UPDATE skills SET title = 'Humanizer', maker = 'an independent developer', summary = 'Removes the signs of AI-generated writing from text while keeping what it says.', pick_note = 'Our team uses this one. I also found it in a roundup of the most starred skill repos.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'humanizer';
22+ UPDATE skills SET title = 'Web Quality Skills', maker = 'a web engineer', summary = 'Audits a site for performance, loading speed, accessibility and SEO.', pick_note = 'A roundup I read recommends it. It gives an agent a clear checklist for the things users feel: speed and accessibility.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'web-quality-skills';
23+ UPDATE skills SET title = 'Browser Driver', maker = 'an AI lab', summary = 'Drives a real browser from the terminal, for navigation, forms and screenshots.', pick_note = 'Our team uses this one. Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'playwright';
24+ UPDATE skills SET title = 'Web App Testing', maker = 'an AI lab', summary = 'Tests a local web app in a real browser: it drives the interface and checks that it behaves.', pick_note = 'A roundup I read recommends it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'webapp-testing';
25+ UPDATE skills SET title = 'Mobile App Framework Skills', maker = 'a mobile tools company', summary = 'Skills for working with a popular cross-platform mobile app framework and its build services.', pick_note = 'These come from the framework''s own team, so they follow how it is meant to be used today.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'expo-skills';
26+ UPDATE skills SET title = 'Fix Failing Checks', maker = 'an AI lab', summary = 'Inspects a pull request''s failing automated checks, reads the logs and proposes a fix.', pick_note = 'Our team uses this one. Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gh-fix-ci';
27+ UPDATE skills SET title = 'MCP Builder', maker = 'an AI lab', summary = 'Guides an agent through building a production MCP server.', pick_note = 'Skillfarm has an MCP server too, so this one is close to home.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'mcp-builder';
28+ UPDATE skills SET title = 'Web Interface Best Practices', maker = 'a web hosting company', summary = 'Rules for fast, well-composed web interface components, for agents that write or review that code.', pick_note = 'It lives in an official skill collection that two roundups I read recommend.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'react-best-practices';
29+ UPDATE skills SET title = 'Codebase Graph', maker = 'a developer tools studio', summary = 'Turns a codebase, with its docs, SQL schemas, configs and PDFs, into a knowledge graph your agent can query.', pick_note = 'I found it in a roundup of the most starred skill repos. It helps most on a large codebase the agent has not seen before.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'graphify';
30+ UPDATE skills SET title = 'Founder Stack', maker = 'a startup investor', summary = 'One person''s whole agent setup: 23 opinionated tools that act as CEO, designer, engineering manager, release manager, doc engineer and QA.', pick_note = 'I found it in a roundup of the most starred skill repos. It is opinionated, which is the point: you get one person''s whole way of working.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gstack';
31+ UPDATE skills SET title = 'Common Mistake Guidelines', maker = 'an independent developer', summary = 'A single instruction file of coding rules about where language models go wrong, such as wrong assumptions, bloat and unrelated edits.', pick_note = 'One roundup I read recommends it, and it is among the most starred repos of its kind. The repo states no licence.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'karpathy-guidelines';
32+ UPDATE skills SET title = 'Production Engineering Skills', maker = 'a web engineer', summary = 'Production-grade engineering skills for coding agents, covering spec, plan, build, verify, review and ship.', pick_note = 'Two roundups I read recommend it. You can install one skill at a time, which makes it easy to try.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'agent-skills-addy-osmani';
33+ UPDATE skills SET title = 'Agent Harness', maker = 'an independent developer', summary = 'A full harness for coding agents: skills, memory, hooks and a plan, test, implement, review workflow, for several agents.', pick_note = 'Two roundups I read recommend it. It is a large system, so read the README before you install it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'ecc';
34+ UPDATE skills SET title = 'Skills for Real Engineers', maker = 'a programming teacher', summary = 'Small, composable engineering workflows from one teacher''s own agents folder, such as diagnosing bugs and test-driven development.', pick_note = 'Two roundups I read recommend it, and it is one of the most starred skill repos.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'skills-for-real-engineers';
35+ UPDATE skills SET title = 'Superpowers', maker = 'an independent developer', summary = 'A skills framework and development method for coding agents: brainstorm, plan, build test-first, hand work to subagents, then review.', pick_note = 'Four separate roundups I read recommend it, more than any other skill I found.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'superpowers';
36+ UPDATE skills SET title = 'Anything to Explainer', maker = 'an independent developer', summary = 'Give it a topic, doc, paper or repo and it produces a narrated motion-graphics explainer video with voiceover, subtitles and chapters.', pick_note = 'It ships in OpenTalon''s community skills. Its licence is the maker''s own, so read the licence file in the repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'anything2explainer';
37+ UPDATE skills SET title = 'Motion Films', maker = 'an independent developer', summary = 'Motion graphics and product launch films made by your coding agent. You can point at a frame and ask for a change.', pick_note = 'It ships in OpenTalon''s community skills. The README is in Chinese and English.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'huashu-motion';
38+ UPDATE skills SET title = 'Video in Code', maker = 'a video software company', summary = 'Good practice for making videos in code with a popular video framework, with skills for captions, rendering, maps and more.', pick_note = 'Our team uses this one. It ships in OpenTalon''s community skills. The repo states no licence, so install it from the maker and do not copy it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'remotion';
39+ UPDATE skills SET title = 'HTML to Video', maker = 'a video AI company', summary = 'Write HTML, render MP4. An open-source video framework built for agents, with skills for captions, explainers, motion graphics, slideshows and more.', pick_note = 'The Skillfarm team makes video with this. It ships in OpenTalon''s community skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'hyperframes';
40+ UPDATE skills SET title = 'Archify', maker = 'an independent developer', summary = 'Turns an idea, plan or codebase into an interactive diagram or a one-page answer, with ten diagram types and pull request walkthroughs.', pick_note = 'I found it in a roundup of the most starred skill repos. It is useful when you need to explain a system to someone, not only build it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'archify';
41+ UPDATE skills SET title = 'Hallmark', maker = 'an independent developer', summary = 'A design skill for self-contained HTML and CSS pages that do not look machine-made.', pick_note = 'I found it in a roundup of the most starred skill repos. It is a small, focused skill aimed at one problem: generic-looking pages.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'hallmark';
42+ UPDATE skills SET title = 'Diagram Design', maker = 'a designer', summary = 'Editorial-quality diagrams as self-contained HTML and SVG, in 52 diagram types.', pick_note = 'I found it in a roundup of the most starred skill repos. The output is one file you can open anywhere, which makes it easy to share.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'diagram-design';
43+ UPDATE skills SET title = 'Design Engineering', maker = 'a design engineer', summary = 'Guidance on interface animation, gestures and mobile web details, from a collection of skills for designers and engineers.', pick_note = 'I found it in a roundup of the most starred skill repos. It pairs well with the visual design skills here, because it covers how an interface moves.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'emil-design-eng';
44+ UPDATE skills SET title = 'Animated Components', maker = 'a component library', summary = 'Animated web interface components and effects that you can copy into an app.', pick_note = 'It ships in OpenTalon''s community skills. This is a component library more than a single skill, so start from the README in the repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'magic-ui';
45+ UPDATE skills SET title = 'Web Design Guidelines', maker = 'a web hosting company', summary = 'Reviews interface code against a published set of web interface guidelines.', pick_note = 'It ships in OpenTalon''s community skills. Two roundups I read recommend the collection it comes from.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'web-design-guidelines';
46+ UPDATE skills SET title = 'Frontend Design', maker = 'an AI lab', summary = 'A skill for distinctive, production-grade interfaces that avoid the generic look.', pick_note = 'It ships in OpenTalon''s community skills. Three of the roundups I read recommend it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'frontend-design';
47+ UPDATE skills SET title = 'UI and UX Pro', maker = 'a builder collective', summary = 'Design intelligence for building interfaces: styles, palettes, type pairings and UX rules for many stacks.', pick_note = 'It ships in OpenTalon''s community skills. Three of the skill roundups I read recommend it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'ui-ux-pro-max';
48+ UPDATE skills SET title = 'Taste', maker = 'a designer', summary = 'Gives a coding agent art direction: reference images, one design system per site and a browser check, so pages do not come out looking generic.', pick_note = 'It ships in OpenTalon''s community skills. I also found it in a roundup of the most starred skill repos.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'taste';
49+ UPDATE skills SET title = 'Impeccable', maker = 'a designer', summary = 'A design vocabulary for your coding agent. Steer it toward polish or bolder choices, have it critique and audit a UI, and catch AI-looking patterns before they ship.', pick_note = 'Our team uses this one. It ships in OpenTalon''s community skills. It is also one of the most starred design skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'impeccable';
50+ UPDATE skills SET title = 'Video Generation API', maker = 'a search company', summary = 'Guidance for generative video editing and for text, image and video to video generation with a hosted model API.', pick_note = 'It comes from the model maker''s own skills repo. The README has install steps for several agents.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gemini-omni-flash-api';
51+ UPDATE skills SET title = 'Live Streaming Model API', maker = 'a search company', summary = 'Guidance for building real-time, two-way streaming apps with a hosted model''s live API.', pick_note = 'It comes from the model maker''s own skills repo. The README has install steps for several agents.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gemini-live-api-dev';
52+ UPDATE skills SET title = 'Model API from the Shell', maker = 'a search company', summary = 'Calls a hosted model API from the shell for media generation, file and video analysis, and transcription.', pick_note = 'It comes from the model maker''s own skills repo. The README has install steps for several agents.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gemini-api-cli';
53+ UPDATE skills SET title = 'Model API Development', maker = 'a search company', summary = 'Guidance for writing code that calls a hosted model API: text, chat, multimodal input, and image, video and speech generation.', pick_note = 'It comes from the model maker''s own skills repo. The README has install steps for several agents.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gemini-api-dev';
54+ UPDATE skills SET title = 'Life Science Research', maker = 'an AI lab', summary = 'Life sciences research workflows across genetics, omics, chemistry, structure and clinical evidence.', pick_note = 'A plugin with 50 skills. Its manifest marks it proprietary, so install it the maker''s way and do not copy it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'life-science-research';
55+ UPDATE skills SET title = 'Public Equity Research', maker = 'an AI lab', summary = 'Listed-company research: earnings analysis, valuation, model updates, pitches and thesis tracking.', pick_note = 'A plugin with 23 skills. Its manifest marks it proprietary, so install it the maker''s way and do not copy it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'public-equity-investing';
56+ UPDATE skills SET title = 'Product Design', maker = 'an AI lab', summary = 'Turns early product ideas into prototypes a team can review, starting from a confirmed brief.', pick_note = 'A plugin with 10 skills. Its manifest marks it proprietary, so install it the maker''s way and do not copy it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'product-design';
57+ UPDATE skills SET title = 'Security Scans', maker = 'an AI lab', summary = 'Security scans, analysis and investigation workflows for a coding agent.', pick_note = 'A plugin with 20 skills. Its manifest marks it proprietary, so install it the maker''s way and do not copy it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'codex-security';
58+ UPDATE skills SET title = 'Plugin Eval', maker = 'an AI lab', summary = 'Evaluates agent skills and plugins from chat, with local reports and guided benchmarking.', pick_note = 'A plugin with 5 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'plugin-eval';
59+ UPDATE skills SET title = 'Test Phone Apps', maker = 'an AI lab', summary = 'Tests phone apps in an emulator: reproduction, screenshots, interface inspection, logs and profiling.', pick_note = 'A plugin with 2 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'test-android-apps';
60+ UPDATE skills SET title = 'Game Studio', maker = 'an AI lab', summary = 'Designs, prototypes and ships browser games in 2D and 3D, with asset pipelines and playtesting.', pick_note = 'A plugin with 9 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'game-studio';
61+ UPDATE skills SET title = 'Build Web Data Visualization', maker = 'an AI lab', summary = 'Designs, critiques, builds and tests web charts, maps, dashboards and data stories.', pick_note = 'A plugin with 18 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'build-web-data-visualization';
62+ UPDATE skills SET title = 'Build Web Apps', maker = 'an AI lab', summary = 'Front-end design, browser testing, interface components, payments and database guidance for web apps.', pick_note = 'A plugin with 6 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'build-web-apps';
63+ UPDATE skills SET title = 'Build Desktop Apps', maker = 'an AI lab', summary = 'Builds, runs, tests and debugs native desktop apps.', pick_note = 'A plugin with 11 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'build-macos-apps';
64+ UPDATE skills SET title = 'Build Phone Apps', maker = 'an AI lab', summary = 'Native phone app work: interface code, app actions, simulator debugging, performance profiling and leak hunting.', pick_note = 'A plugin with 9 skills.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'build-ios-apps';
65+ UPDATE skills SET title = 'Issue Tracker', maker = 'an AI lab', summary = 'Reads, creates and updates issues and projects in a popular issue tracker.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'linear-codex';
66+ UPDATE skills SET title = 'Error Monitoring', maker = 'an AI lab', summary = 'Inspects issues and events in an error monitoring service and summarises recent production errors.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'sentry-codex';
67+ UPDATE skills SET title = 'Deploy to a Cloud Host', maker = 'an AI lab', summary = 'Deploys apps to a cloud hosting service by reading the codebase and writing its blueprint file.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'render-deploy';
68+ UPDATE skills SET title = 'Deploy a Static Site', maker = 'an AI lab', summary = 'Deploys web projects to a static site host with its command-line tool.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'netlify-deploy';
69+ UPDATE skills SET title = 'Deploy to the Edge', maker = 'an AI lab', summary = 'Deploys apps and infrastructure to an edge cloud platform and its related services.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'cloudflare-deploy';
70+ UPDATE skills SET title = 'Move Between Agents', maker = 'an AI lab', summary = 'Moves instruction files, skills, agents and MCP settings from one coding agent to another.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'migrate-to-codex';
71+ UPDATE skills SET title = 'Command-Line Tool Creator', maker = 'an AI lab', summary = 'Builds a command-line tool for the agent to use, from API docs, an API spec, request examples or an SDK.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'cli-creator';
72+ UPDATE skills SET title = 'Transcribe', maker = 'an AI lab', summary = 'Turns audio files into text, with optional speaker labels.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'transcribe';
73+ UPDATE skills SET title = 'Data Notebooks', maker = 'an AI lab', summary = 'Creates and edits data notebooks for experiments, explorations and tutorials.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'jupyter-notebook';
74+ UPDATE skills SET title = 'Address Review Comments', maker = 'an AI lab', summary = 'Works through the review comments on the open pull request for your branch.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'gh-address-comments';
75+ UPDATE skills SET title = 'Security Ownership Map', maker = 'an AI lab', summary = 'Maps who owns which files from git history, and finds sensitive code that depends on too few people.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'security-ownership-map';
76+ UPDATE skills SET title = 'Security Threat Model', maker = 'an AI lab', summary = 'Builds a threat model from the repository itself: trust boundaries, assets, attacker abilities, abuse paths and mitigations.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'security-threat-model';
77+ UPDATE skills SET title = 'Security Best Practices', maker = 'an AI lab', summary = 'Reviews code against security best practice for its language and framework, and suggests improvements.', pick_note = 'Its maker now marks the repo as older examples, but the skill folder is still there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'security-best-practices';
78+ UPDATE skills SET title = 'Teacher Skills', maker = 'an AI lab', summary = 'Four skills for school teachers: lesson plans, lesson prep, differentiation by proficiency level, and checks for understanding in maths.', pick_note = 'The README installs it from a downloaded copy, so follow the steps there.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'k12-teacher-skills';
79+ UPDATE skills SET title = 'Life Sciences Skills', maker = 'an AI lab', summary = 'Four research skills: clinical trial protocols, trial success forecasts, a validation gauntlet for designed protein binders, and choosing research problems.', pick_note = 'Each skill installs as its own plugin, so check the README for the one you want.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'life-sciences';
80+ UPDATE skills SET title = 'Healthcare Skills', maker = 'an AI lab', summary = 'Eleven skills for clinical and payer work: note extraction, diagnosis and procedure coding, prior authorisation review, health records and claims fraud screening.', pick_note = 'The repo has no licence file, so install it from the maker and do not copy it. Clinical output needs a qualified reviewer.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'healthcare';
81+ UPDATE skills SET title = 'Repeat Until Done', maker = 'an AI lab', summary = 'Runs the agent on the same task again and again until it is done.', pick_note = 'Our team uses this one. It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'ralph-loop';
82+ UPDATE skills SET title = 'Feature Dev', maker = 'an AI lab', summary = 'A feature workflow with agents for exploring the codebase, designing the architecture and reviewing quality.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'feature-dev';
83+ UPDATE skills SET title = 'Code Review', maker = 'an AI lab', summary = 'Reviews pull requests with several specialist agents and scores each finding to filter out false alarms.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'claude-code-review';
84+ UPDATE skills SET title = 'Agent Setup', maker = 'an AI lab', summary = 'Reads a codebase and recommends the hooks, skills, MCP servers and subagents that would suit it.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'claude-code-setup';
85+ UPDATE skills SET title = 'Project Memory Files', maker = 'an AI lab', summary = 'Audits and improves an agent''s project instruction files, and captures what a session learned so project memory stays current.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'claude-md-management';
86+ UPDATE skills SET title = 'Hookify', maker = 'an AI lab', summary = 'Creates agent hooks that stop unwanted behaviour, from plain rules or from patterns in your conversations.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'hookify';
87+ UPDATE skills SET title = 'MCP Server Dev', maker = 'an AI lab', summary = 'Guides the design and build of an MCP server, including the choice between remote and local deployment.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'mcp-server-dev';
88+ UPDATE skills SET title = 'Plugin Dev', maker = 'an AI lab', summary = 'Seven skills for building agent plugins: hooks, MCP integration, commands, agents and good practice.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'plugin-dev';
89+ UPDATE skills SET title = 'Security Agent Team', maker = 'an AI lab', summary = 'A team of agents maps your code, hunts for exploitable flaws and challenges every finding before reporting it.', pick_note = 'It comes from its maker''s official plugin marketplace.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'claude-security';
90+ UPDATE skills SET title = 'Pitch Agent', maker = 'an AI lab', summary = 'Takes comps, precedents and an LBO through to a branded pitch deck.', pick_note = 'Part of a financial services suite, with 11 skills. Check its numbers against your sources before you rely on them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'pitch-agent';
91+ UPDATE skills SET title = 'Fund Admin', maker = 'an AI lab', summary = 'Fund administration: ledger reconciliation, break tracing, accruals, roll-forwards, variance commentary and NAV tie-out.', pick_note = 'Part of a financial services suite, with 6 skills. Check its numbers against your sources before you rely on them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'fund-admin';
92+ UPDATE skills SET title = 'Private Equity', maker = 'an AI lab', summary = 'Deal sourcing for private equity: company discovery, CRM integration and founder outreach.', pick_note = 'Part of a financial services suite, with 10 skills. Check its numbers against your sources before you rely on them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'private-equity';
93+ UPDATE skills SET title = 'Equity Research', maker = 'an AI lab', summary = 'Earnings analysis, initiating coverage reports and research workflows.', pick_note = 'Part of a financial services suite, with 9 skills. Check its numbers against your sources before you rely on them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'equity-research';
94+ UPDATE skills SET title = 'Investment Banking', maker = 'an AI lab', summary = 'Client and market insights, deck creation, financial analysis and transaction management for bankers.', pick_note = 'Part of a financial services suite, with 9 skills. Check its numbers against your sources before you rely on them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'investment-banking';
95+ UPDATE skills SET title = 'Financial Analysis', maker = 'an AI lab', summary = 'Core modelling tools: DCF, comps, LBO and three-statement models, competitive analysis and deck checks.', pick_note = 'Part of a financial services suite, with 13 skills. Check its numbers against your sources before you rely on them.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'financial-analysis';
96+ UPDATE skills SET title = 'Legal Builder Hub', maker = 'an AI lab', summary = 'Finds, checks and installs community legal skills, with a security review before anything is added.', pick_note = 'Part of a legal suite, with 10 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'legal-builder-hub';
97+ UPDATE skills SET title = 'Legal Clinic', maker = 'an AI lab', summary = 'Sets up a law school clinic: student onboarding, structured intake, deadline tracking and end-of-semester handoffs.', pick_note = 'Part of a legal suite, with 16 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'legal-clinic';
98+ UPDATE skills SET title = 'Law Student', maker = 'an AI lab', summary = 'Socratic drills, case briefs, outlines, bar prep and graded IRAC practice. It coaches and does not write the work for you.', pick_note = 'Part of a legal suite, with 13 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'law-student';
99+ UPDATE skills SET title = 'AI Governance Legal', maker = 'an AI lab', summary = 'Triages proposed AI uses, runs impact assessments, reviews vendors'' AI terms and keeps your AI policy current.', pick_note = 'Part of a legal suite, with 10 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'ai-governance-legal';
100+ UPDATE skills SET title = 'Regulatory Legal', maker = 'an AI lab', summary = 'Watches regulatory feeds, compares new rules with your policies, and tracks comment deadlines and open gaps.', pick_note = 'Part of a legal suite, with 9 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'regulatory-legal';
101+ UPDATE skills SET title = 'Product Legal', maker = 'an AI lab', summary = 'Reviews product launches against your risk settings and checks marketing copy for claims that need backing.', pick_note = 'Part of a legal suite, with 7 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'product-legal';
102+ UPDATE skills SET title = 'Privacy Legal', maker = 'an AI lab', summary = 'Triages processing activities, writes privacy impact assessments, reviews data processing agreements and drafts data access request responses.', pick_note = 'Part of a legal suite, with 9 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'privacy-legal';
103+ UPDATE skills SET title = 'Litigation Legal', maker = 'an AI lab', summary = 'Manages matters, deadlines and holds, and drafts claim charts, chronologies, deposition prep, privilege logs and briefs.', pick_note = 'Part of a legal suite, with 19 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'litigation-legal';
104+ UPDATE skills SET title = 'IP Legal', maker = 'an AI lab', summary = 'First-pass trademark clearance, freedom-to-operate triage, invention screening, cease-and-desist and takedown letters, and open source checks.', pick_note = 'Part of a legal suite, with 12 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'ip-legal';
105+ UPDATE skills SET title = 'Employment Legal', maker = 'an AI lab', summary = 'Flags jurisdiction-specific risk in hires and terminations, classifies workers, tracks leave deadlines and drafts policies.', pick_note = 'Part of a legal suite, with 20 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'employment-legal';
106+ UPDATE skills SET title = 'Corporate Legal', maker = 'an AI lab', summary = 'M&A diligence with cited review tables, disclosure schedules, closing checklists, board consents and entity compliance deadlines.', pick_note = 'Part of a legal suite, with 13 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'corporate-legal';
107+ UPDATE skills SET title = 'Commercial Legal', maker = 'an AI lab', summary = 'Reviews vendor agreements, NDAs and software contracts against your playbook, and tracks renewals and cancel-by dates.', pick_note = 'Part of a legal suite, with 12 skills. It is built for lawyers to supervise, so have a lawyer review what it produces.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'commercial-legal';
108+ UPDATE skills SET title = 'Small Business Plugin', maker = 'an AI lab', summary = 'Ready-made workflows for running a small business. You approve every step that touches money or customers.', pick_note = 'A plugin for small business owners, with 44 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'small-business-plugin';
109+ UPDATE skills SET title = 'Bio Research Plugin', maker = 'an AI lab', summary = 'Connects to preclinical research tools and databases for literature search, genomics analysis and target prioritisation.', pick_note = 'A plugin for early-stage life sciences research, with 6 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'bio-research-plugin';
110+ UPDATE skills SET title = 'Productivity Plugin', maker = 'an AI lab', summary = 'Manages tasks, plans your day and keeps a memory of the context that matters in your work.', pick_note = 'A plugin for day-to-day work, with 4 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'productivity-plugin';
111+ UPDATE skills SET title = 'Company Search Plugin', maker = 'an AI lab', summary = 'Searches across your company''s email, chat, documents and wikis from one place.', pick_note = 'A plugin for anyone who hunts for things across company tools, with 5 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'enterprise-search-plugin';
112+ UPDATE skills SET title = 'Customer Support Plugin', maker = 'an AI lab', summary = 'Triages tickets, drafts replies, escalates issues and turns solved problems into help articles.', pick_note = 'A plugin for support teams, with 5 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'customer-support-plugin';
113+ UPDATE skills SET title = 'Human Resources Plugin', maker = 'an AI lab', summary = 'Recruiting, onboarding, performance reviews, compensation analysis and policy guidance.', pick_note = 'A plugin for people teams, with 9 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'human-resources-plugin';
114+ UPDATE skills SET title = 'Operations Plugin', maker = 'an AI lab', summary = 'Vendor reviews, process documentation, change management, capacity planning and compliance tracking.', pick_note = 'A plugin for operations teams, with 9 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'operations-plugin';
115+ UPDATE skills SET title = 'Design Plugin', maker = 'an AI lab', summary = 'Design critique, design system upkeep, UX writing, accessibility audits, research synthesis and developer handoff.', pick_note = 'A plugin for product designers, with 7 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'design-plugin';
116+ UPDATE skills SET title = 'Engineering Plugin', maker = 'an AI lab', summary = 'Standups, code review, architecture decisions, incident response and technical documentation.', pick_note = 'A plugin for engineering teams, with 10 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'engineering-plugin';
117+ UPDATE skills SET title = 'Product Management Plugin', maker = 'an AI lab', summary = 'Feature specs, roadmaps, user research synthesis, stakeholder updates and competitive briefs.', pick_note = 'A plugin for product managers, with 8 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'product-management-plugin';
118+ UPDATE skills SET title = 'Data Plugin', maker = 'an AI lab', summary = 'Writes SQL, explores datasets, builds charts and dashboards, and turns results into a clear story.', pick_note = 'A plugin for data analysts, with 10 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'data-plugin';
119+ UPDATE skills SET title = 'Marketing Plugin', maker = 'an AI lab', summary = 'Content, campaign plans, brand voice checks, competitor tracking and performance reports.', pick_note = 'A plugin for marketing teams, with 8 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'marketing-plugin';
120+ UPDATE skills SET title = 'Sales Plugin', maker = 'an AI lab', summary = 'Call prep, call summaries and follow-ups, account research, deal and pipeline reviews, and the forecast.', pick_note = 'A plugin for sales teams, with 36 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'sales-plugin';
121+ UPDATE skills SET title = 'Finance Plugin', maker = 'an AI lab', summary = 'Journal entries, reconciliation, financial statements, variance analysis, audit prep and month-end close.', pick_note = 'A plugin for finance and accounting teams, with 8 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'finance-plugin';
122+ UPDATE skills SET title = 'Legal Plugin', maker = 'an AI lab', summary = 'Contract review, NDA triage, compliance checks, legal briefs and vendor checks for in-house legal teams.', pick_note = 'A plugin for in-house legal teams, with 9 skills. It does more when your work tools are connected.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'legal-plugin';
123+ UPDATE skills SET title = 'Discernment Nudge', maker = 'an AI lab', summary = 'After a substantial answer or draft, adds two or three follow-up questions that help you check the facts and the reasoning.', pick_note = 'A small skill with a good habit in it: question the answer before you act on it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'discernment-nudge';
124+ UPDATE skills SET title = 'Learning Guide', maker = 'an AI lab', summary = 'Points you to matching courses and tutorials from its maker''s learning site when you ask how to use their assistant.', pick_note = 'It only helps if you want to learn its maker''s own products.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'academy-guide';
125+ UPDATE skills SET title = 'Model API Reference', maker = 'an AI lab', summary = 'A reference for building on a hosted model API and its SDKs: models, streaming, tool use, MCP, caching and migration.', pick_note = 'Its maker keeps it current with its API.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'claude-api';
126+ UPDATE skills SET title = 'Doc Co-authoring', maker = 'an AI lab', summary = 'Walks you through writing a document together: gather the context, refine the structure, then test it on a fresh reader.', pick_note = 'Unlike its neighbours, this folder has no licence file, so install it from the maker and do not copy it.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'doc-coauthoring';
127+ UPDATE skills SET title = 'Internal Comms', maker = 'an AI lab', summary = 'Writes internal company updates such as status reports, leadership updates, newsletters, FAQs and incident reports, in set formats.', pick_note = 'It ships as one of the example skills in its maker''s skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'internal-comms';
128+ UPDATE skills SET title = 'Web Artifacts Builder', maker = 'an AI lab', summary = 'Builds larger single-page HTML apps for a chat assistant, with components and styles, for work that needs state or routing.', pick_note = 'It ships as one of the example skills in its maker''s skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'web-artifacts-builder';
129+ UPDATE skills SET title = 'Chat GIF Creator', maker = 'an AI lab', summary = 'Makes animated GIFs sized for team chat, with the size limits, checks and animation ideas built in.', pick_note = 'It ships as one of the example skills in its maker''s skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'slack-gif-creator';
130+ UPDATE skills SET title = 'Brand Guidelines', maker = 'an AI lab', summary = 'Applies one company''s brand colours and type to whatever the agent makes.', pick_note = 'It is most useful as a template for a brand skill of your own.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'brand-guidelines';
131+ UPDATE skills SET title = 'Theme Factory', maker = 'an AI lab', summary = 'Applies one of ten ready-made themes, or a new one made on the spot, to slides, documents, reports and landing pages.', pick_note = 'It ships as one of the example skills in its maker''s skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'theme-factory';
132+ UPDATE skills SET title = 'Canvas Design', maker = 'an AI lab', summary = 'Designs posters and other static visual pieces as PNG or PDF, starting from a written design philosophy.', pick_note = 'It ships as one of the example skills in its maker''s skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'canvas-design';
133+ UPDATE skills SET title = 'Algorithmic Art', maker = 'an AI lab', summary = 'Makes generative art in code with seeded randomness and controls you can explore, such as flow fields and particle systems.', pick_note = 'It ships as one of the example skills in its maker''s skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'algorithmic-art';
134+ UPDATE skills SET title = 'Spreadsheets', maker = 'an AI lab', summary = 'Opens, fixes and builds spreadsheets, with formulas, formatting and charts, in xlsx, csv and tsv.', pick_note = 'It installs together with the other three document skills as one plugin.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'excel-spreadsheets';
135+ UPDATE skills SET title = 'Slide Decks', maker = 'an AI lab', summary = 'Creates, reads and edits slide deck files, from a single slide to a full pitch deck.', pick_note = 'It installs together with the other three document skills as one plugin.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'powerpoint-decks';
136+ UPDATE skills SET title = 'PDF Files', maker = 'an AI lab', summary = 'Reads, merges, splits, rotates and fills PDF files, and pulls text and tables out of them.', pick_note = 'It installs together with the other three document skills as one plugin.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'pdf-files';
137+ UPDATE skills SET title = 'Documents', maker = 'an AI lab', summary = 'Creates, reads and edits word processor files, including templates, tracked changes and comments.', pick_note = 'It installs together with the other three document skills as one plugin.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'word-documents';
138+ UPDATE skills SET title = 'One Take', maker = 'an independent developer', summary = 'Makes short product launch films and feature demos as one continuous take, built from your real interface, where each beat grows out of the one before.', pick_note = 'The repo comes with eleven finished example films. It is free for noncommercial use only: films for clients or a business need the maker''s paid licence.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'onetake';
139+ UPDATE skills SET title = 'Films in Code', maker = 'a creative studio', summary = 'Directs and produces a short film made entirely in code, in one of a library of styles such as oil painting, watercolor, woodblock print and satellite briefing.', pick_note = 'A library of 98 film styles, each with a demo film. The maker says other models may not reproduce the styles well. The code is MIT, and the guides and style prompts are for noncommercial use.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'lemo-opuscar';
140+ UPDATE skills SET title = 'Workflow Automation Skills', maker = 'a workflow automation company', summary = 'Skills for building and editing automation workflows through the platform''s MCP server: expressions, loops, sub-workflows, error handling, credentials, data tables, debugging and agents.', pick_note = 'Made by the platform''s team to go with its built-in MCP server (turned on in its settings). Fifteen skills with reference docs and worked examples.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'n8n-official-skills';
141+ UPDATE skills SET title = 'Workflow Automation MCP Skills', maker = 'an independent developer', summary = 'Fourteen skills that teach an agent to build automation workflows with a community MCP server: workflow patterns, node configuration, expressions, code nodes, validation and self-hosting.', pick_note = 'The long-running community set, by the author of the community server it needs. Parts are adapted from the official skills under Apache-2.0, and the repo says which.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'n8n-mcp-skills';
142+ UPDATE skills SET title = '3D App MCP Server', maker = 'an open-source 3D project', summary = 'The official MCP server for a free 3D app. Your agent can inspect a scene file, look things up in the manual and API docs, take screenshots and renders, and run Python inside the app to build or change a scene.', pick_note = 'It has two parts: an add-on inside the app and a small server your agent talks to on your own machine. It runs the Python your agent writes with no safety checks, and that code can reach the rest of your computer, so use it on a machine and with files you can afford to lose. An MCP server, not a skill file.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'blender-mcp-server';
143+ UPDATE skills SET title = 'Code Host MCP Server', maker = 'a code hosting company', summary = 'The official MCP server for a large code host. Your agent can read repositories and code, manage issues and pull requests, check automated runs and look at security alerts.', pick_note = 'The hosted server is the quickest way in, and the repo has a guide for each agent plus a local option. Use a token with only the access you need. An MCP server, not a skill file.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'github-mcp-server';
144+ UPDATE skills SET title = 'Browser Automation MCP', maker = 'a software company', summary = 'An MCP server for browser automation. Your agent drives a real browser through the page''s accessibility tree, with no screenshots needed.', pick_note = 'Its own readme says coding agents often do better with its command-line tool and skills, and that the MCP server suits long exploratory sessions that keep one browser open. An MCP server, not a skill file.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'playwright-mcp';
145+ UPDATE skills SET title = 'Browser DevTools for Agents', maker = 'a browser team', summary = 'A browser developer tools MCP server and skills. Your agent controls and inspects a live browser: console, network, performance traces, accessibility and memory.', pick_note = 'The plugin installs the MCP server and seven skills together, including ones for accessibility checks, cookies, slow page loads and memory leaks.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'chrome-devtools-mcp';
146+ UPDATE skills SET title = 'Hosted Database MCP Server', maker = 'a database company', summary = 'The official MCP server for a hosted database platform. Your agent can manage tables, read project settings, query data and search the docs.', pick_note = 'Read the security notes before you connect it to a project with real data. The address can be limited to one project and to read-only access. An MCP server, not a skill file.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'supabase-mcp';
147+ UPDATE skills SET title = 'Cloud Platform MCP Server', maker = 'a cloud company', summary = 'The official MCP server for a whole cloud platform API: compute, databases, storage, DNS and the rest, through three small tools.', pick_note = 'The maker now recommends it over their older per-product servers. You choose what it may touch when you sign in. An MCP server, not a skill file.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'cloudflare-mcp';
148+ UPDATE skills SET title = 'Error Monitoring MCP', maker = 'an error monitoring company', summary = 'The official MCP server for an error monitoring service. Your agent can look up errors, issues, traces and performance data while it debugs.', pick_note = 'Made for coding agents with a person in the loop. The licence lets you use it but not offer it as a competing service, and becomes Apache-2.0 after two years. An MCP server, not a skill file.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'sentry-mcp';
149+ UPDATE skills SET title = 'Current Library Docs', maker = 'a cloud data company', summary = 'Current documentation and code examples for the library you are using, fetched into your agent so it stops guessing at old APIs.', pick_note = 'The setup command lets you choose between a skill that uses their command-line tool and an MCP server. A free API key raises the rate limit.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'context7';
150+ UPDATE skills SET title = 'Payments Platform', maker = 'a payments company', summary = 'The official plugin and skills for building on a payments platform, with a hosted MCP server for working with your account.', pick_note = 'Their older agent toolkit packages are retired, so use these. Start in test mode before you let an agent near live payments.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'stripe';
151+ UPDATE skills SET title = 'Design Canvas Skills', maker = 'a design tools company', summary = 'Official skills and MCP server for a design tool: build and edit designs on the canvas, turn designs into code, and set up design system libraries.', pick_note = 'Eighteen skills that come with the design tool''s MCP server. It limits how much you can read by plan. There is no open-source licence. Use is under the maker''s developer terms.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'figma-official-skills';
152+ UPDATE skills SET title = 'Agent Council', maker = 'Skillfarm', summary = 'Give three different AI models the same decision, compare their independent recommendations, then test what they agree on.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs your own access to each model.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'agent-council';
153+ UPDATE skills SET title = 'AI Motion Design', maker = 'Skillfarm', summary = 'Turn a reference video and a message into an editable video made in code.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'ai-motion-design';
154+ UPDATE skills SET title = 'Secrets Manager', maker = 'Skillfarm', summary = 'Fetch a key from a secrets manager for one command without ever showing it.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs a secrets manager account.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'bitwarden-secrets';
155+ UPDATE skills SET title = 'Node-Based Video Production', maker = 'Skillfarm', summary = 'Run node-based video generation jobs, check every clip and fix audio sync.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs a video generation server you can reach.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'comfyui-video-production';
156+ UPDATE skills SET title = 'Dev Tunnels', maker = 'Skillfarm', summary = 'Keep dev servers and reserved public tunnels matched, one port per project.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs a tunnel service account.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'dev-tunnels';
157+ UPDATE skills SET title = 'Image Studio', maker = 'Skillfarm', summary = 'Make and edit images with a hosted image generation API.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs your own API key, and each image costs money.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'grok-imagine';
158+ UPDATE skills SET title = 'Image Generation', maker = 'Skillfarm', summary = 'Make images from text or from a reference photo with a hosted image model.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs your own API key, and each image costs money.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'imagegen-2';
159+ UPDATE skills SET title = 'Professional Posts', maker = 'Skillfarm', summary = 'Draft, review and publish posts on a professional network in your own voice, never without a yes.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'linkedin-agent';
160+ UPDATE skills SET title = 'Agent Wiki', maker = 'Skillfarm', summary = 'Keep a wiki of linked Markdown pages that your agent builds from the sources you give it.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'llm-wiki';
161+ UPDATE skills SET title = 'Image Maker', maker = 'Skillfarm', summary = 'Make images with a hosted image model.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs your own API key, and each image costs money.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'nano-banana';
162+ UPDATE skills SET title = 'Song Writer', maker = 'Skillfarm', summary = 'Write songs for an AI music app: five options with prompt and lyrics, nothing made until you approve.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It needs a music app account to make the song.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'suno-song';
163+ UPDATE skills SET title = 'Freelance Proposals', maker = 'Skillfarm', summary = 'Screen freelance jobs, talk through the concerns, and write only the proposals you approve.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo. It never submits or spends anything.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'upwork-proposals';
164+ UPDATE skills SET title = 'Post Hooks', maker = 'Skillfarm', summary = 'Write the opening line of a short social post.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'x-post-hooks';
165+ UPDATE skills SET title = 'Video Channel System', maker = 'Skillfarm', summary = 'Plan a video channel: niche, scripts, titles, thumbnails, production and analytics reviews.', pick_note = 'Made by the team that runs Skillfarm. Free and public domain (Unlicense), and kept in the open in their skills repo.' WHERE owner_id = 'sprout00000agent' AND kind = 'link' AND slug = 'youtube-channel-system';

migrations/0019_biolock.sql added

1+ -- BioLock sign-in: each device's own fingerprint or face reader. No passwords and no outside sign-in providers.
2+ -- oauth_accounts is kept as it is, so data keyed to older accounts (such as verified repo owners) stays linked.
3+
4+ CREATE TABLE biolock_credentials (
5+ id TEXT PRIMARY KEY, -- credential id (base64url)
6+ user_id TEXT NOT NULL REFERENCES users(id),
7+ alg INTEGER NOT NULL,
8+ public_jwk TEXT NOT NULL, -- public key as JSON; the private key never leaves the device
9+ counter INTEGER NOT NULL DEFAULT 0,
10+ name TEXT NOT NULL DEFAULT '',
11+ created_at INTEGER NOT NULL,
12+ last_used_at INTEGER
13+ );
14+ CREATE INDEX biolock_credentials_user ON biolock_credentials (user_id);
15+
16+ -- Single-use challenges, five minutes each.
17+ CREATE TABLE biolock_challenges (
18+ id TEXT PRIMARY KEY,
19+ challenge TEXT NOT NULL,
20+ kind TEXT NOT NULL, -- signin | new | add | link
21+ user_id TEXT, -- for new: the id the account will get; for add and link: the account
22+ link_hash TEXT,
23+ expires_at INTEGER NOT NULL
24+ );
25+
26+ -- One-time links that add BioLock on another device. Only a SHA-256 hash of the link code is stored.
27+ CREATE TABLE biolock_links (
28+ token_hash TEXT PRIMARY KEY,
29+ user_id TEXT NOT NULL REFERENCES users(id),
30+ expires_at INTEGER NOT NULL,
31+ created_at INTEGER NOT NULL
32+ );

public/biolock.js added

1+ // BioLock: browser side.
2+ // Sign in with this device's own fingerprint or face reader. Nothing else: no security keys,
3+ // no QR codes, no phone-to-computer sign-in. Uses the browser's W3C Web Authentication API,
4+ // limited to the built-in reader. Public domain (Unlicense).
5+
6+ const KEY = 'biolock:enrolled-here';
7+
8+ function toB64u(buf) {
9+ const b = new Uint8Array(buf); let s = '';
10+ for (let i = 0; i < b.length; i++) s += String.fromCharCode(b[i]);
11+ return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
12+ }
13+ function fromB64u(str) {
14+ const s = String(str).replace(/-/g, '+').replace(/_/g, '/');
15+ const bin = atob(s + '='.repeat((4 - (s.length % 4)) % 4));
16+ const out = new Uint8Array(bin.length);
17+ for (let i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i);
18+ return out;
19+ }
20+ function load() { try { return JSON.parse(localStorage.getItem(KEY) || '{}'); } catch { return {}; } }
21+ function save(v) { try { localStorage.setItem(KEY, JSON.stringify(v)); } catch { /* private mode: still works, just less smooth */ } }
22+
23+ // Which IDs this device enrolled, per site. Only IDs, never secrets.
24+ export function enrolledOnThisDevice(rpId = location.hostname) { return load()[rpId] || []; }
25+ export function rememberEnrolled(id, rpId = location.hostname) {
26+ const all = load(); const list = new Set(all[rpId] || []); list.add(id); all[rpId] = [...list]; save(all);
27+ }
28+ export function forgetEnrolled(id, rpId = location.hostname) {
29+ const all = load(); all[rpId] = (all[rpId] || []).filter((x) => x !== id); save(all);
30+ }
31+
32+ // Does this device have its own fingerprint or face reader the browser can use?
33+ export async function hasBuiltInReader() {
34+ if (!window.PublicKeyCredential) return false;
35+ try {
36+ if (PublicKeyCredential.getClientCapabilities) {
37+ const c = await PublicKeyCredential.getClientCapabilities();
38+ if (typeof c.userVerifyingPlatformAuthenticator === 'boolean') return c.userVerifyingPlatformAuthenticator;
39+ }
40+ return await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
41+ } catch { return false; }
42+ }
43+
44+ function creationFromJSON(o) {
45+ if (PublicKeyCredential.parseCreationOptionsFromJSON) return PublicKeyCredential.parseCreationOptionsFromJSON(o);
46+ return { ...o, challenge: fromB64u(o.challenge), user: { ...o.user, id: fromB64u(o.user.id) },
47+ excludeCredentials: (o.excludeCredentials || []).map((c) => ({ ...c, id: fromB64u(c.id) })) };
48+ }
49+ function requestFromJSON(o) {
50+ if (PublicKeyCredential.parseRequestOptionsFromJSON) return PublicKeyCredential.parseRequestOptionsFromJSON(o);
51+ return { ...o, challenge: fromB64u(o.challenge), allowCredentials: (o.allowCredentials || []).map((c) => ({ ...c, id: fromB64u(c.id) })) };
52+ }
53+ function credToJSON(c) {
54+ const r = c.response, out = { id: c.id, rawId: toB64u(c.rawId), type: c.type, authenticatorAttachment: c.authenticatorAttachment || null, response: { clientDataJSON: toB64u(r.clientDataJSON) } };
55+ if (r.attestationObject) {
56+ out.response.attestationObject = toB64u(r.attestationObject);
57+ out.response.transports = r.getTransports ? r.getTransports() : [];
58+ } else {
59+ out.response.authenticatorData = toB64u(r.authenticatorData);
60+ out.response.signature = toB64u(r.signature);
61+ out.response.userHandle = r.userHandle ? toB64u(r.userHandle) : null;
62+ }
63+ return out;
64+ }
65+
66+ // Enroll this device's reader. `options` comes from server.registrationOptions().
67+ export async function enrollThisDevice(options) {
68+ if (!(await hasBuiltInReader())) throw new Error('This device has no fingerprint or face reader.');
69+ const cred = await navigator.credentials.create({ publicKey: creationFromJSON(options) });
70+ if (cred.authenticatorAttachment && cred.authenticatorAttachment !== 'platform') throw new Error('Only this device\'s own reader can be used.');
71+ const json = credToJSON(cred);
72+ rememberEnrolled(json.id, options.rp.id);
73+ return json;
74+ }
75+
76+ // Sign in with this device's reader. `options` comes from
77+ // server.signInOptions({ deviceCredentialIds: enrolledOnThisDevice() }).
78+ // With no saved IDs the browser offers any key this device's own reader holds for the site.
79+ export async function signIn(options, { signal } = {}) {
80+ const o = { ...options, hints: ['client-device'], allowCredentials: (options.allowCredentials || []).map((c) => ({ ...c, transports: ['internal'] })) };
81+ const cred = await navigator.credentials.get({ publicKey: requestFromJSON(o), signal });
82+ if (cred.authenticatorAttachment && cred.authenticatorAttachment !== 'platform') throw new Error('Only this device\'s own reader can be used.');
83+ return credToJSON(cred);
84+ }
85+
86+ // After a device is removed on the server, forget it here and tell the browser to drop it,
87+ // where supported, so it is never offered again.
88+ export async function removedOnServer(id, rpId = location.hostname) {
89+ forgetEnrolled(id, rpId);
90+ try { if (PublicKeyCredential.signalUnknownCredential) await PublicKeyCredential.signalUnknownCredential({ rpId, credentialId: id }); } catch { /* fine */ }
91+ }

public/js/biolock-page.js added

1+ // Wires the BioLock buttons on the sign-in, settings and add-device pages.
2+ import { enrollThisDevice, enrolledOnThisDevice, hasBuiltInReader, signIn } from '/biolock.js';
3+
4+ const post = async (url, body) => {
5+ const r = await fetch(url, { method: 'POST', headers: { 'content-type': 'application/json', accept: 'application/json' }, body: JSON.stringify(body), credentials: 'same-origin' });
6+ const data = await r.json().catch(() => ({}));
7+ if (!r.ok) throw new Error(data.message || 'Something went wrong. Try again.');
8+ return data;
9+ };
10+
11+ const deviceName = () => {
12+ const ua = navigator.userAgent;
13+ if (/iPhone|Android.+Mobile/.test(ua)) return 'Phone';
14+ if (/iPad|Android|Tablet/.test(ua) || (navigator.maxTouchPoints > 1 && /Macintosh/.test(ua))) return 'Tablet';
15+ return 'Computer';
16+ };
17+
18+ const friendly = (e) => {
19+ if (e && (e.name === 'NotAllowedError' || e.name === 'AbortError')) return 'BioLock was cancelled or timed out. Try again.';
20+ if (e && e.name === 'InvalidStateError') return 'This device already has BioLock for this account.';
21+ return (e && e.message) || 'Something went wrong. Try again.';
22+ };
23+
24+ for (const box of document.querySelectorAll('[data-biolock]')) {
25+ const status = box.querySelector('[data-biolock-status]');
26+ const say = (text) => { if (status) status.textContent = text; };
27+ const next = box.dataset.next || '/';
28+ const buttons = box.querySelectorAll('button');
29+ const busy = (on) => buttons.forEach((b) => { b.disabled = on; });
30+
31+ hasBuiltInReader().then((ok) => {
32+ if (!ok) say('This browser cannot reach a fingerprint or face reader on this device. BioLock needs one: try a phone, tablet or computer that has one, or turn it on in the device settings.');
33+ });
34+
35+ box.querySelector('[data-biolock-signin]')?.addEventListener('click', async () => {
36+ busy(true); say('Use your fingerprint or face.');
37+ try {
38+ const start = await post('/api/biolock/signin/options', { ids: enrolledOnThisDevice() });
39+ const response = await signIn(start.options);
40+ const done = await post('/api/biolock/signin/verify', { challengeId: start.challengeId, response, next });
41+ location.assign(done.next || next);
42+ } catch (e) { say(friendly(e)); busy(false); }
43+ });
44+
45+ for (const btn of box.querySelectorAll('[data-biolock-register]')) {
46+ btn.addEventListener('click', async () => {
47+ const mode = btn.dataset.biolockRegister;
48+ busy(true); say('Use your fingerprint or face.');
49+ try {
50+ const token = mode === 'link' ? location.hash.slice(1) : undefined;
51+ const start = await post('/api/biolock/register/options', { mode, token });
52+ const response = await enrollThisDevice(start.options);
53+ const done = await post('/api/biolock/register/verify', { challengeId: start.challengeId, response, name: deviceName(), next });
54+ location.assign(done.next || next);
55+ } catch (e) { say(friendly(e)); busy(false); }
56+ });
57+ }
58+ }

scripts/biolock-link.sh added

1+ #!/bin/bash
2+ # Make a one-time link that adds BioLock to an existing account, such as the site owner's Sprout account.
3+ # Usage: scripts/biolock-link.sh <handle> [minutes, default 30]
4+ # Open the printed link on the device to add and use its fingerprint or face. It works once.
5+ set -euo pipefail
6+ handle="${1:?usage: scripts/biolock-link.sh <handle> [minutes]}"
7+ minutes="${2:-30}"
8+ [[ "$handle" =~ ^[a-z0-9-]+$ ]] || { echo "bad handle" >&2; exit 1; }
9+ [[ "$minutes" =~ ^[0-9]+$ ]] || { echo "bad minutes" >&2; exit 1; }
10+ cd "$(dirname "$0")/.."
11+ token="$(openssl rand 24 | base64 | tr '+/' '-_' | tr -d '=')"
12+ hash="$(printf '%s' "$token" | shasum -a 256 | cut -d' ' -f1)"
13+ now="$(date +%s)"
14+ npx wrangler d1 execute skillfarm --remote --command \
15+ "INSERT INTO biolock_links (token_hash, user_id, expires_at, created_at) SELECT '$hash', id, $((now + minutes * 60)), $now FROM users WHERE handle = '$handle' AND status = 'active'" >/dev/null
16+ count="$(npx wrangler d1 execute skillfarm --remote --json --command "SELECT COUNT(*) AS n FROM biolock_links WHERE token_hash = '$hash'" | python3 -c 'import json,sys; print(json.load(sys.stdin)[0]["results"][0]["n"])')"
17+ [ "$count" = "1" ] || { echo "No active account with handle $handle." >&2; exit 1; }
18+ echo "https://skillfarm.ai/biolock/add#$token"
19+ echo "Works once, until $(date -r $((now + minutes * 60)))."

src/env.ts changed

66 SKILLS: R2Bucket;
77 ASSETS: Fetcher;
88 SITE_URL: string;
9- ADMIN_GITHUB_IDS: string;
109 EMAIL_FROM: string;
1110 AI_REVIEW_MODEL: string;
1211 SESSION_SECRET?: string;
13- GITHUB_CLIENT_ID?: string;
14- GITHUB_CLIENT_SECRET?: string;
15- GOOGLE_CLIENT_ID?: string;
16- GOOGLE_CLIENT_SECRET?: string;
1712 ANTHROPIC_API_KEY?: string;
1813 RESEND_API_KEY?: string;
1914 VIRUSTOTAL_API_KEY?: string;
⋯
5247 export type AppEnv = { Bindings: Env; Variables: Vars };
5348 export type Ctx = Context<AppEnv>;
5449
55- export const VERSION = '2026.11.26.10';
50+ export const VERSION = '2026.12.03.1';

src/lib/biolock.ts added

1+ import type { Ctx, User } from '../env';
2+ import { registrationOptions, signInOptions, verifyRegistration, verifySignIn } from './biolock/server';
3+ import { HttpError, b64url, newId, now, randomToken, sha256Hex } from './util';
4+
5+ /**
6+ * BioLock: sign in with the fingerprint or face reader built into your own device. Nothing else: no passwords,
7+ * no outside sign-in providers, no security keys, no phone-to-computer sign-in. The checks live in ./biolock/server.
8+ */
9+
10+ const CHALLENGE_SECONDS = 300;
11+ export const LINK_MINUTES = 10;
12+
13+ export type Credential = { id: string; user_id: string; alg: number; public_jwk: string; counter: number; name: string; created_at: number; last_used_at: number | null };
14+ type Challenge = { id: string; challenge: string; kind: string; user_id: string | null; link_hash: string | null; expires_at: number };
15+ export type RegisterMode = 'new' | 'add' | 'link';
16+
17+ function site(c: Ctx): { rpId: string; origin: string } {
18+ const u = new URL(c.req.url);
19+ return { rpId: u.hostname.replace(/^www\./, ''), origin: u.origin };
20+ }
21+
22+ async function saveChallenge(c: Ctx, challenge: string, kind: string, userId: string | null, linkHash: string | null = null): Promise<string> {
23+ const id = randomToken(18);
24+ const ts = now();
25+ await c.env.DB.batch([
26+ c.env.DB.prepare('DELETE FROM biolock_challenges WHERE expires_at < ?').bind(ts),
27+ c.env.DB.prepare('INSERT INTO biolock_challenges (id, challenge, kind, user_id, link_hash, expires_at) VALUES (?,?,?,?,?,?)').bind(id, challenge, kind, userId, linkHash, ts + CHALLENGE_SECONDS),
28+ ]);
29+ return id;
30+ }
31+
32+ /** Each challenge works once: it is deleted as it is read. */
33+ async function takeChallenge(c: Ctx, id: unknown): Promise<Challenge> {
34+ if (typeof id !== 'string' || !id) throw new HttpError(400, 'That sign-in expired. Try again.');
35+ const row = await c.env.DB.prepare('DELETE FROM biolock_challenges WHERE id = ? RETURNING *').bind(id).first<Challenge>();
36+ if (!row || row.expires_at < now()) throw new HttpError(400, 'That sign-in expired. Try again.');
37+ return row;
38+ }
39+
40+ export async function credentialsFor(c: Ctx, userId: string): Promise<Credential[]> {
41+ const r = await c.env.DB.prepare('SELECT * FROM biolock_credentials WHERE user_id = ? ORDER BY created_at').bind(userId).all<Credential>();
42+ return r.results;
43+ }
44+
45+ async function linkUser(c: Ctx, token: unknown): Promise<{ hash: string; userId: string }> {
46+ if (typeof token !== 'string' || token.length < 20 || token.length > 100) throw new HttpError(400, 'This link is not valid. Make a new one in Settings.');
47+ const hash = await sha256Hex(token);
48+ const row = await c.env.DB.prepare('SELECT user_id, expires_at FROM biolock_links WHERE token_hash = ?').bind(hash).first<{ user_id: string; expires_at: number }>();
49+ if (!row || row.expires_at < now()) throw new HttpError(410, 'This link was already used or has expired. Make a new one in Settings.');
50+ return { hash, userId: row.user_id };
51+ }
52+
53+ /** Options for adding BioLock on this device: a new account, the signed-in account, or the account a one-time link names. */
54+ export async function startRegistration(c: Ctx, mode: RegisterMode, token?: unknown) {
55+ const user = c.get('user');
56+ let userId: string;
57+ let label: string;
58+ let linkHash: string | null = null;
59+ if (mode === 'add') {
60+ if (!user) throw new HttpError(401, 'Sign in first.');
61+ userId = user.id;
62+ label = user.handle;
63+ } else if (mode === 'link') {
64+ const link = await linkUser(c, token);
65+ userId = link.userId;
66+ linkHash = link.hash;
67+ const owner = await c.env.DB.prepare('SELECT handle FROM users WHERE id = ?').bind(userId).first<{ handle: string }>();
68+ label = owner?.handle ?? 'skillfarm';
69+ } else {
70+ userId = newId();
71+ label = `grower-${userId.slice(0, 5)}`;
72+ }
73+ const exclude = mode === 'new' ? [] : (await credentialsFor(c, userId)).map((x) => x.id);
74+ const { rpId } = site(c);
75+ const options = registrationOptions({ rpId, rpName: 'Skillfarm', userId: b64url(new TextEncoder().encode(userId)), userName: label, displayName: label, excludeIds: exclude as never[] });
76+ return { options, challengeId: await saveChallenge(c, options.challenge, mode, userId, linkHash) };
77+ }
78+
79+ /** Checks the new device and stores its public key. Returns the account it belongs to and whether that account is new. */
80+ export async function finishRegistration(c: Ctx, challengeId: unknown, response: unknown, name: string): Promise<{ userId: string; created: boolean }> {
81+ const ch = await takeChallenge(c, challengeId);
82+ if (!['new', 'add', 'link'].includes(ch.kind) || !ch.user_id) throw new HttpError(400, 'That sign-in expired. Try again.');
83+ if (ch.kind === 'add' && c.get('user')?.id !== ch.user_id) throw new HttpError(401, 'Sign in first.');
84+ const { rpId, origin } = site(c);
85+ let record: { id: string; alg: number; publicKey: JsonWebKey; counter: number };
86+ try {
87+ record = await verifyRegistration({ credential: response, expectedChallenge: ch.challenge, expectedOrigin: origin, rpId });
88+ } catch (e) {
89+ throw new HttpError(400, `BioLock could not add this device: ${(e as Error).message}.`);
90+ }
91+ if (ch.kind === 'link') {
92+ // Spend the link now, once. A second use finds nothing to delete.
93+ const spent = await c.env.DB.prepare('DELETE FROM biolock_links WHERE token_hash = ? AND expires_at >= ? RETURNING user_id').bind(ch.link_hash, now()).first<{ user_id: string }>();
94+ if (!spent || spent.user_id !== ch.user_id) throw new HttpError(410, 'This link was already used or has expired. Make a new one in Settings.');
95+ }
96+ const ts = now();
97+ const insert = c.env.DB.prepare('INSERT INTO biolock_credentials (id, user_id, alg, public_jwk, counter, name, created_at) VALUES (?,?,?,?,?,?,?)').bind(
98+ record.id, ch.user_id, record.alg, JSON.stringify(record.publicKey), record.counter, name.slice(0, 40), ts,
99+ );
100+ if (ch.kind === 'new') {
101+ await c.env.DB.batch([
102+ c.env.DB.prepare("INSERT INTO users (id, handle, display_name, created_at) VALUES (?,?,'New grower',?)").bind(ch.user_id, `grower-${ch.user_id.slice(0, 8)}`, ts),
103+ insert,
104+ ]);
105+ return { userId: ch.user_id, created: true };
106+ }
107+ await insert.run();
108+ return { userId: ch.user_id, created: false };
109+ }
110+
111+ /** Sign-in options. `ids` are the device IDs this browser added; with none, the device's own reader offers what it holds. */
112+ export async function startSignIn(c: Ctx, ids: unknown) {
113+ const list = Array.isArray(ids) ? ids.filter((x): x is string => typeof x === 'string' && /^[A-Za-z0-9_-]{16,400}$/.test(x)).slice(0, 20) : [];
114+ const { rpId } = site(c);
115+ const options = signInOptions({ rpId, deviceCredentialIds: list as never[] });
116+ return { options, challengeId: await saveChallenge(c, options.challenge, 'signin', null) };
117+ }
118+
119+ export async function finishSignIn(c: Ctx, challengeId: unknown, response: unknown): Promise<User> {
120+ const ch = await takeChallenge(c, challengeId);
121+ if (ch.kind !== 'signin') throw new HttpError(400, 'That sign-in expired. Try again.');
122+ const id = (response as { id?: unknown } | null)?.id;
123+ if (typeof id !== 'string') throw new HttpError(400, 'BioLock did not finish. Try again.');
124+ const cred = await c.env.DB.prepare('SELECT * FROM biolock_credentials WHERE id = ?').bind(id).first<Credential>();
125+ if (!cred) throw new HttpError(401, 'This device has no BioLock for Skillfarm yet. Create an account, or add this device from Settings on a device that is signed in.');
126+ const { rpId, origin } = site(c);
127+ let result: { counter: number };
128+ try {
129+ result = await verifySignIn({ credential: response, stored: { id: cred.id, alg: cred.alg, publicKey: JSON.parse(cred.public_jwk), counter: cred.counter }, expectedChallenge: ch.challenge, expectedOrigin: origin, rpId });
130+ } catch (e) {
131+ throw new HttpError(401, `BioLock could not sign you in: ${(e as Error).message}.`);
132+ }
133+ await c.env.DB.prepare('UPDATE biolock_credentials SET counter = ?, last_used_at = ? WHERE id = ?').bind(result.counter, now(), cred.id).run();
134+ const user = await c.env.DB.prepare('SELECT * FROM users WHERE id = ?').bind(cred.user_id).first<User>();
135+ if (!user || user.status !== 'active') throw new HttpError(403, 'This account is not active.');
136+ return user;
137+ }
138+
139+ /** A one-time link that adds BioLock on another device. The code sits in the URL fragment, so servers never log it. */
140+ export async function makeLink(c: Ctx, userId: string): Promise<string> {
141+ const token = randomToken(24);
142+ const ts = now();
143+ await c.env.DB.batch([
144+ c.env.DB.prepare('DELETE FROM biolock_links WHERE expires_at < ?').bind(ts),
145+ c.env.DB.prepare('INSERT INTO biolock_links (token_hash, user_id, expires_at, created_at) VALUES (?,?,?,?)').bind(await sha256Hex(token), userId, ts + LINK_MINUTES * 60, ts),
146+ ]);
147+ return `${new URL(c.req.url).origin}/biolock/add#${token}`;
148+ }

src/lib/biolock/README.md added

1+ # BioLock (vendored)
2+
3+ BioLock by Moontrace, public domain (Unlicense). `server.ts` is the server half and `public/biolock.js` the browser half, copied from the vendored copy in atom-mail (`src/biolock/`), which carries the transport fix for built-in readers that report `["hybrid", "internal"]`.
4+
5+ Local change in `public/biolock.js`: `signIn` accepts empty `allowCredentials`, so a browser with no saved device IDs (for example a new browser on a device whose key syncs) can still offer that device's own reader. The server still refuses anything that is not the built-in reader.

src/lib/biolock/server.ts added

1+ // @ts-nocheck -- vendored BioLock (public domain, Unlicense). See README.md in this folder.
2+ // BioLock: server side.
3+ // Sign in with the fingerprint or face reader built into your own device. Nothing else:
4+ // no passwords, no security keys, no QR codes, no phone-to-computer sign-in.
5+ // Under the hood it uses the W3C Web Authentication standard, because that is the only way
6+ // browsers let a website use the device's own reader, and turns off every other part of it.
7+ // Runs anywhere with Web Crypto (Cloudflare Workers, Deno, Bun, Node 20+, browsers).
8+ // No dependencies. Public domain (Unlicense).
9+
10+ const enc = new TextEncoder();
11+ const dec = new TextDecoder();
12+
13+ // ---------- base64url ----------
14+ export function toB64u(bytes) {
15+ const b = bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes);
16+ let s = '';
17+ for (let i = 0; i < b.length; i++) s += String.fromCharCode(b[i]);
18+ return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
19+ }
20+ export function fromB64u(str) {
21+ const s = String(str).replace(/-/g, '+').replace(/_/g, '/');
22+ const bin = atob(s + '='.repeat((4 - (s.length % 4)) % 4));
23+ const out = new Uint8Array(bin.length);
24+ for (let i = 0; i < bin.length; i++) out[i] = bin.charCodeAt(i);
25+ return out;
26+ }
27+ export function randomB64u(n = 32) { return toB64u(crypto.getRandomValues(new Uint8Array(n))); }
28+
29+ // ---------- tiny CBOR reader (only what WebAuthn uses) ----------
30+ export function cborDecode(buf, pos = 0) {
31+ const dv = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
32+ function len(info) {
33+ if (info < 24) return info;
34+ if (info === 24) return buf[pos++];
35+ if (info === 25) { const v = dv.getUint16(pos); pos += 2; return v; }
36+ if (info === 26) { const v = dv.getUint32(pos); pos += 4; return v; }
37+ if (info === 27) { const v = Number(dv.getBigUint64(pos)); pos += 8; return v; }
38+ throw new Error('CBOR: unsupported length');
39+ }
40+ function item() {
41+ if (pos >= buf.length) throw new Error('CBOR: ran out of data');
42+ const ib = buf[pos++], major = ib >> 5, info = ib & 31;
43+ switch (major) {
44+ case 0: return len(info);
45+ case 1: return -1 - len(info);
46+ case 2: { const n = len(info); const v = buf.slice(pos, pos + n); pos += n; return v; }
47+ case 3: { const n = len(info); const v = dec.decode(buf.subarray(pos, pos + n)); pos += n; return v; }
48+ case 4: { const n = len(info); const a = []; for (let i = 0; i < n; i++) a.push(item()); return a; }
49+ case 5: { const n = len(info); const m = new Map(); for (let i = 0; i < n; i++) { const k = item(); m.set(k, item()); } return m; }
50+ case 6: len(info); return item(); // tag: keep the value
51+ case 7:
52+ if (info === 20) return false;
53+ if (info === 21) return true;
54+ if (info === 22) return null;
55+ throw new Error('CBOR: unsupported simple value');
56+ }
57+ throw new Error('CBOR: bad major type');
58+ }
59+ const value = item();
60+ return { value, end: pos };
61+ }
62+
63+ // ---------- authenticator data ----------
64+ export const FLAGS = { UP: 0x01, UV: 0x04, BE: 0x08, BS: 0x10, AT: 0x40, ED: 0x80 };
65+ export function parseAuthData(ad) {
66+ if (ad.length < 37) throw new Error('authenticator data too short');
67+ const flags = ad[32];
68+ const out = {
69+ rpIdHash: ad.slice(0, 32),
70+ flags,
71+ userPresent: !!(flags & FLAGS.UP),
72+ userVerified: !!(flags & FLAGS.UV),
73+ backupEligible: !!(flags & FLAGS.BE),
74+ backedUp: !!(flags & FLAGS.BS),
75+ counter: new DataView(ad.buffer, ad.byteOffset + 33, 4).getUint32(0),
76+ };
77+ if (flags & FLAGS.AT) {
78+ let p = 37;
79+ out.aaguid = ad.slice(p, p + 16); p += 16;
80+ const idLen = (ad[p] << 8) | ad[p + 1]; p += 2;
81+ out.credentialId = ad.slice(p, p + idLen); p += idLen;
82+ const { value, end } = cborDecode(ad, p);
83+ out.coseKey = value;
84+ out.coseKeyBytes = ad.slice(p, end);
85+ }
86+ return out;
87+ }
88+
89+ // ---------- keys ----------
90+ // COSE key (from the authenticator) -> JWK we can store as plain JSON.
91+ export function coseToJwk(cose) {
92+ const kty = cose.get(1), alg = cose.get(3);
93+ if (kty === 2 && alg === -7 && cose.get(-1) === 1) return { alg: -7, jwk: { kty: 'EC', crv: 'P-256', x: toB64u(cose.get(-2)), y: toB64u(cose.get(-3)) } };
94+ if (kty === 1 && alg === -8 && cose.get(-1) === 6) return { alg: -8, jwk: { kty: 'OKP', crv: 'Ed25519', x: toB64u(cose.get(-2)) } };
95+ if (kty === 3 && alg === -257) return { alg: -257, jwk: { kty: 'RSA', n: toB64u(cose.get(-1)), e: toB64u(cose.get(-2)) } };
96+ throw new Error('unsupported key type (we accept ES256, Ed25519 and RS256)');
97+ }
98+ const ALGS = {
99+ [-7]: { imp: { name: 'ECDSA', namedCurve: 'P-256' }, ver: { name: 'ECDSA', hash: 'SHA-256' } },
100+ [-8]: { imp: { name: 'Ed25519' }, ver: { name: 'Ed25519' } },
101+ [-257]: { imp: { name: 'RSASSA-PKCS1-v1_5', hash: 'SHA-256' }, ver: { name: 'RSASSA-PKCS1-v1_5' } },
102+ };
103+ // WebAuthn ES256 signatures are DER; Web Crypto wants raw r||s.
104+ export function derToRaw(der, size = 32) {
105+ let p = 0;
106+ if (der[p++] !== 0x30) throw new Error('bad signature');
107+ if (der[p] & 0x80) p += 1 + (der[p] & 0x7f); else p++;
108+ const part = () => {
109+ if (der[p++] !== 0x02) throw new Error('bad signature');
110+ const n = der[p++]; let v = der.slice(p, p + n); p += n;
111+ while (v.length > size && v[0] === 0) v = v.slice(1);
112+ const o = new Uint8Array(size); o.set(v, size - v.length); return o;
113+ };
114+ const r = part(), s = part(), out = new Uint8Array(size * 2);
115+ out.set(r); out.set(s, size); return out;
116+ }
117+ async function verifySig(alg, jwk, sig, data) {
118+ const a = ALGS[alg];
119+ if (!a) throw new Error('unsupported algorithm');
120+ const key = await crypto.subtle.importKey('jwk', jwk, a.imp, false, ['verify']);
121+ return crypto.subtle.verify(a.ver, key, alg === -7 ? derToRaw(sig) : sig, data);
122+ }
123+ async function sha256(bytes) { return new Uint8Array(await crypto.subtle.digest('SHA-256', bytes)); }
124+ function same(a, b) { if (a.length !== b.length) return false; let d = 0; for (let i = 0; i < a.length; i++) d |= a[i] ^ b[i]; return d === 0; }
125+
126+ // ---------- options ----------
127+ // Enroll this device's own fingerprint or face reader. Built-in reader only, verified every time.
128+ export function registrationOptions({ rpId, rpName, userId, userName, displayName, excludeIds = [], timeout = 120000 }) {
129+ return {
130+ challenge: randomB64u(32),
131+ rp: { id: rpId, name: rpName || rpId },
132+ user: { id: userId || randomB64u(16), name: userName, displayName: displayName || userName },
133+ pubKeyCredParams: [{ type: 'public-key', alg: -8 }, { type: 'public-key', alg: -7 }, { type: 'public-key', alg: -257 }],
134+ authenticatorSelection: { authenticatorAttachment: 'platform', residentKey: 'required', requireResidentKey: true, userVerification: 'required' },
135+ hints: ['client-device'],
136+ excludeCredentials: excludeIds.map((id) => ({ type: 'public-key', id, transports: ['internal'] })),
137+ attestation: 'none',
138+ timeout,
139+ };
140+ }
141+ // Sign in with this device's reader. `deviceCredentialIds` are the IDs this device enrolled
142+ // (client.js enrolledOnThisDevice()). Only the built-in reader is allowed, so the browser goes
143+ // straight to the fingerprint or face and has no other way to offer.
144+ export function signInOptions({ rpId, deviceCredentialIds = [], timeout = 120000 }) {
145+ return {
146+ challenge: randomB64u(32),
147+ rpId,
148+ userVerification: 'required',
149+ allowCredentials: deviceCredentialIds.map((id) => ({ type: 'public-key', id, transports: ['internal'] })),
150+ hints: ['client-device'],
151+ timeout,
152+ };
153+ }
154+
155+ // Built-in readers only: refuse security keys and phone-to-computer (QR) sign-ins.
156+ const OUTSIDE = ['usb', 'nfc', 'ble', 'hybrid', 'smart-card'];
157+ function builtInOnly(credential) {
158+ if (credential.authenticatorAttachment && credential.authenticatorAttachment !== 'platform') throw new Error('only this device\'s own fingerprint or face reader is allowed');
159+ // Built-in readers that sync (iCloud Keychain, Google Password Manager) report ["hybrid", "internal"].
160+ // Allow that pair from a built-in reader; "hybrid" alone (a phone over QR) is still refused.
161+ const t = (credential.response && credential.response.transports) || [];
162+ const outside = credential.authenticatorAttachment === 'platform' && t.includes('internal') ? OUTSIDE.filter((x) => x !== 'hybrid') : OUTSIDE;
163+ if (t.some((x) => outside.includes(x))) throw new Error('only this device\'s own fingerprint or face reader is allowed');
164+ }
165+
166+ function checkClientData(cdjBytes, type, expectedChallenge, origins) {
167+ const cd = JSON.parse(dec.decode(cdjBytes));
168+ if (cd.type !== type) throw new Error('wrong ceremony type');
169+ if (cd.challenge !== expectedChallenge) throw new Error('challenge does not match');
170+ const allowed = Array.isArray(origins) ? origins : [origins];
171+ if (!allowed.includes(cd.origin)) throw new Error('wrong website: ' + cd.origin);
172+ if (cd.crossOrigin === true) throw new Error('cross-origin frames are not allowed');
173+ return cd;
174+ }
175+
176+ // ---------- verify a new device ----------
177+ // Returns a record to store: { id, alg, publicKey (JWK), counter, transports, backupEligible, backedUp }.
178+ // The private key stays sealed inside the device; the server only ever holds this public key.
179+ export async function verifyRegistration({ credential, expectedChallenge, expectedOrigin, rpId, requireUserVerification = true }) {
180+ if (!credential || credential.type !== 'public-key') throw new Error('not a sign-in credential');
181+ builtInOnly(credential);
182+ const r = credential.response;
183+ checkClientData(fromB64u(r.clientDataJSON), 'webauthn.create', expectedChallenge, expectedOrigin);
184+ const att = cborDecode(fromB64u(r.attestationObject)).value;
185+ const ad = parseAuthData(att.get('authData'));
186+ if (!same(ad.rpIdHash, await sha256(enc.encode(rpId)))) throw new Error('enrolled for a different site');
187+ if (!ad.userPresent) throw new Error('no user presence');
188+ if (requireUserVerification && !ad.userVerified) throw new Error('fingerprint, face or PIN was not used');
189+ if (!ad.credentialId) throw new Error('nothing enrolled in response');
190+ if (toB64u(ad.credentialId) !== credential.id) throw new Error('device id mismatch');
191+ const { alg, jwk } = coseToJwk(ad.coseKey);
192+ return {
193+ id: credential.id, alg, publicKey: jwk, counter: ad.counter,
194+ transports: ['internal'],
195+ backupEligible: ad.backupEligible, backedUp: ad.backedUp,
196+ createdAt: Date.now(),
197+ };
198+ }
199+
200+ // ---------- verify a sign-in ----------
201+ // `stored` is the record from verifyRegistration. Returns { userHandle, counter, backedUp } on success;
202+ // save the new counter back to your store.
203+ export async function verifySignIn({ credential, stored, expectedChallenge, expectedOrigin, rpId, requireUserVerification = true }) {
204+ if (!credential || credential.type !== 'public-key') throw new Error('not a sign-in credential');
205+ builtInOnly(credential);
206+ if (credential.id !== stored.id) throw new Error('unknown device');
207+ const r = credential.response;
208+ const cdj = fromB64u(r.clientDataJSON);
209+ checkClientData(cdj, 'webauthn.get', expectedChallenge, expectedOrigin);
210+ const adBytes = fromB64u(r.authenticatorData);
211+ const ad = parseAuthData(adBytes);
212+ if (!same(ad.rpIdHash, await sha256(enc.encode(rpId)))) throw new Error('enrolled for a different site');
213+ if (!ad.userPresent) throw new Error('no user presence');
214+ if (requireUserVerification && !ad.userVerified) throw new Error('fingerprint, face or PIN was not used');
215+ const signed = new Uint8Array(adBytes.length + 32);
216+ signed.set(adBytes); signed.set(await sha256(cdj), adBytes.length);
217+ if (!(await verifySig(stored.alg, stored.publicKey, fromB64u(r.signature), signed))) throw new Error('signature check failed');
218+ // Counter: some devices keep it at 0. If both are non-zero it must go up, or the key may be cloned.
219+ if ((ad.counter !== 0 || stored.counter !== 0) && ad.counter <= stored.counter) throw new Error('counter went backwards: possible cloned key');
220+ return { userHandle: r.userHandle || null, counter: ad.counter, backedUp: ad.backedUp };
221+ }
222+
223+ // ---------- "Add a device" links ----------
224+ // A one-time link made on a signed-in device (send it to yourself by email or message). Opening
225+ // it on the new device enrolls that device's own fingerprint or face. Signed with your server secret.
226+ // Single use: keep `nonce` in your store after it is used and refuse it again.
227+ async function hmac(secret, data) {
228+ const key = await crypto.subtle.importKey('raw', enc.encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
229+ return new Uint8Array(await crypto.subtle.sign('HMAC', key, enc.encode(data)));
230+ }
231+ export async function makeDeviceInvite({ secret, accountId, minutes = 10 }) {
232+ const body = toB64u(enc.encode(JSON.stringify({ a: accountId, n: randomB64u(12), x: Date.now() + minutes * 60000 })));
233+ return body + '.' + toB64u(await hmac(secret, body));
234+ }
235+ export async function readDeviceInvite({ secret, token }) {
236+ const [body, sig] = String(token).split('.');
237+ if (!body || !sig || !same(fromB64u(sig), await hmac(secret, body))) throw new Error('invite link is not valid');
238+ const p = JSON.parse(dec.decode(fromB64u(body)));
239+ if (Date.now() > p.x) throw new Error('invite link expired, make a new one');
240+ return { accountId: p.a, nonce: p.n, expiresAt: p.x };
241+ }

src/lib/brands.ts added

1+ /**
2+ * Card words stay plain: no outside company, product or person names in a skill's title, maker, summary or pick note.
3+ * Write "a cloud company" or "an AI lab", not the name. Our own names (Skillfarm and the other Project ATOM names) are fine.
4+ * Words that are also ordinary English ("Word", "Render", "Linear", "X") are matched only when capitalised mid-sentence,
5+ * so they are left out of this list; reviewers catch those.
6+ */
7+ const NAMES = [
8+ 'Anthropic', 'Claude', 'OpenAI', 'Codex', 'ChatGPT', 'GPT', 'Gemini', 'Google', 'Microsoft', 'Apple', 'macOS', 'iOS', 'iPhone', 'iPad', 'Android',
9+ 'Cloudflare', 'Vercel', 'GitHub', 'GitLab', 'Stripe', 'Supabase', 'Figma', 'Slack', 'YouTube', 'Reddit', 'Twitter', 'LinkedIn', 'Upwork', 'Suno',
10+ 'Bitwarden', 'ngrok', 'xAI', 'Grok', 'Sentry', 'Netlify', 'Runpod', 'Hugging Face', 'HashiCorp', 'Terraform', 'PlanetScale', 'DuckDB', 'Obsidian',
11+ 'Expo', 'React', 'Playwright', 'Lighthouse', 'Remotion', 'HeyGen', 'Blender', 'n8n', 'Upstash', 'Chrome', 'Excel', 'PowerPoint', 'Jupyter',
12+ 'Polymarket', 'Hacker News', 'Postgres', 'MySQL', 'SwiftUI', 'Xcode', 'Tailwind', 'ComfyUI', 'Docker', 'Discord', 'Meta', 'Amazon', 'AWS', 'Azure',
13+ ];
14+ const RX = new RegExp(`\\b(${NAMES.map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('|')})\\b`, 'i');
15+
16+ /** The first outside name found in any of the texts, or null when they are all plain. */
17+ export function brandIn(...texts: (string | null | undefined)[]): string | null {
18+ for (const t of texts) {
19+ const m = t ? RX.exec(t) : null;
20+ if (m) return m[1];
21+ }
22+ return null;
23+ }

src/lib/github.ts changed

2929
3030 function headers(env: Env, extra: Record<string, string> = {}): Record<string, string> {
3131 const h: Record<string, string> = { 'user-agent': 'skillfarm', accept: 'application/vnd.github+json', 'x-github-api-version': '2022-11-28', ...extra };
32- // An OAuth app may identify itself with its id and secret for a higher rate limit on public data.
33- if (env.GITHUB_CLIENT_ID && env.GITHUB_CLIENT_SECRET) h.authorization = 'Basic ' + btoa(`${env.GITHUB_CLIENT_ID}:${env.GITHUB_CLIENT_SECRET}`);
3432 return h;
3533 }
3634

src/lib/imports.ts changed

4949 const { user } = input;
5050 if (user.status !== 'active') throw new HttpError(403, 'This account cannot share skills.');
5151 const ref = parseGithubUrl(input.url);
52- if (!ref) throw new HttpError(400, 'That does not look like a repo. Paste its address, for example https://github.com/you/your-skills.');
52+ if (!ref) throw new HttpError(400, 'That does not look like a repo. Paste the full address of your public repo.');
5353 const repoKey = `${ref.owner}/${ref.repo}`.toLowerCase();
5454
5555 const open = await env.DB.prepare(

src/lib/install.ts changed

8787 const clone = repoCloneUrl(repo);
8888 const quickSource = ownRepo(repo) ? `${clone} --skill ${folder} --full-depth` : url;
8989 const all = Object.keys(AGENT_HOMES) as AgentKey[];
90- const maker = s.maker ?? 'its maker';
9190 return {
9291 repo: repoLabel(repo),
9392 path,
⋯
105104 check: AGENT_HOMES[a].check,
106105 copy: true,
107106 })),
108- note: `A copy of this skill that Skillfarm converted to read the same in every major coding agent. ${maker} wrote the skill and keeps the copyright. The copy is used under its licence, the author's text is unchanged, and its NOTICE.md lists every change.`,
107+ note: `A copy of this skill that Skillfarm converted to read the same in every major coding agent. The author's text is unchanged.`,
109108 };
110109 }
111110

src/lib/skills.ts changed

11 import type { Env, User } from '../env';
2+ import { brandIn } from './brands';
23 import { runAiReview } from './ai';
34 import { mail } from './email';
45 import { BUNDLE_LIMITS, isSafePath, isTextPath, refreshRepoSignals } from './github';
⋯
392393 };
393394 if (title.length < 2) throw new HttpError(400, 'Give the pick a title.');
394395 if (summary.length < 12) throw new HttpError(400, 'Say what the skill does in a sentence.');
395- if (!maker) throw new HttpError(400, 'Name the maker. Picks always credit who made the skill.');
396+ if (!maker) throw new HttpError(400, 'Say what kind of maker made it, such as "a cloud company" or "an independent developer".');
396397 if (!category) throw new HttpError(400, 'Pick a category.');
397398 if (!/^[A-Za-z0-9_.-]{1,100}\/[A-Za-z0-9_.-]{1,100}$/.test(repo)) throw new HttpError(400, 'Give the repo as owner/name.');
398399 const path = (input.path ?? '').trim().replace(/^\/+|\/+$/g, '').slice(0, 200) || null;
⋯
403404 const license = one(input.license, 60) || null;
404405 const hint = (input.installHint ?? '').trim().slice(0, 400) || null;
405406 const note = one(input.note, 600) || null;
407+ const brand = brandIn(title, summary, maker, note);
408+ if (brand) throw new HttpError(400, `Use plain words on cards: "${brand}" is a company, product or person name. Describe it instead, such as "a cloud company".`);
406409 const sprout = await env.DB.prepare('SELECT id FROM users WHERE id = ? AND is_agent = 1').bind(SPROUT_ID).first();
407410 if (!sprout) throw new HttpError(503, 'The Sprout account is missing. Apply the database migrations.');
408411 const ts = now();

src/lib/users.ts changed

3535 export async function getUserById(env: Env, id: string): Promise<User | null> {
3636 return env.DB.prepare('SELECT * FROM users WHERE id = ?').bind(id).first<User>();
3737 }
38-
39- export function isAdminGithubId(env: Env, githubId: string): boolean {
40- return (env.ADMIN_GITHUB_IDS || '').split(',').map((s) => s.trim()).filter(Boolean).includes(githubId);
41- }

src/routes/admin.tsx changed

102102 return (
103103 <form method="post" action="/admin/picks" class="form card pad" id="pick-form">
104104 <h2>{pick ? `Edit "${pick.title}"` : 'Add a pick'}</h2>
105- <p class="muted">A pick is a skill someone else made. It goes live as soon as you save it, credits the maker, and links to their repo. Skillfarm stores no copy.</p>
105+ <p class="muted">A pick is a skill someone else made. It goes live as soon as you save it. Skillfarm stores no copy. Use plain words in the title, maker, summary and note: no company, product or person names. Say "a cloud company" or "an independent developer" instead.</p>
106106 {error ? <div class="notice notice-error" role="alert">{error}</div> : null}
107107 {pick ? <input type="hidden" name="id" value={pick.id} /> : null}
108108 <div class="form-grid">
109109 <label><span>Title</span><input name="title" required maxlength={80} value={val('title', pick?.title)} /></label>
110- <label><span>Maker</span><input name="maker" required maxlength={80} value={val('maker', pick?.maker)} placeholder="Who made it" /></label>
111- <label><span>GitHub repo</span><input name="repo" required value={val('repo', pick?.github_repo)} placeholder="owner/name" autocapitalize="none" spellcheck={false} /></label>
110+ <label><span>Maker</span><input name="maker" required maxlength={80} value={val('maker', pick?.maker)} placeholder="What kind of maker, such as a cloud company" /></label>
111+ <label><span>Repo</span><input name="repo" required value={val('repo', pick?.github_repo)} placeholder="owner/name" autocapitalize="none" spellcheck={false} /></label>
112112 <label><span>Folder in the repo (optional)</span><input name="path" value={val('path', pick?.github_path)} placeholder="skills/my-skill" autocapitalize="none" spellcheck={false} /></label>
113113 <label>
114114 <span>Category</span>
⋯
124124 <label><span>Install command, from the maker's README</span><textarea name="install_hint" rows={2} maxlength={400} class="mono" spellcheck={false}>{val('install_hint', pick?.install_hint)}</textarea></label>
125125 <details class="optional">
126126 <summary>Links, if they differ from the repo</summary>
127- <label><span>Where to get it</span><input name="source_url" type="url" value={val('source_url', pick?.source_url)} placeholder="Defaults to the repo or folder on GitHub" /></label>
128- <label><span>Maker's page</span><input name="maker_url" type="url" value={val('maker_url', pick?.maker_url)} placeholder="Defaults to the repo owner on GitHub" /></label>
127+ <label><span>Where to get it</span><input name="source_url" type="url" value={val('source_url', pick?.source_url)} placeholder="Defaults to the repo or folder" /></label>
128+ <label><span>Maker's page</span><input name="maker_url" type="url" value={val('maker_url', pick?.maker_url)} placeholder="Defaults to the repo owner" /></label>
129129 </details>
130130 <fieldset class="checks">
131131 <legend>Works with</legend>
⋯
456456 const e = c.env;
457457 const checks: [string, boolean, string][] = [
458458 ['Session secret', !!e.SESSION_SECRET, 'Required for sign-in.'],
459- ['GitHub sign-in', !!(e.GITHUB_CLIENT_ID && e.GITHUB_CLIENT_SECRET), 'GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET. Also raises the GitHub star lookup limit.'],
460- ['Google sign-in', !!(e.GOOGLE_CLIENT_ID && e.GOOGLE_CLIENT_SECRET), 'GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.'],
461459 ['AI review', !!e.ANTHROPIC_API_KEY, `ANTHROPIC_API_KEY. Model: ${e.AI_REVIEW_MODEL}.`],
462460 ['Email', !!e.RESEND_API_KEY, `RESEND_API_KEY. Sends from ${e.EMAIL_FROM}.`],
463461 ['VirusTotal lookup', !!e.VIRUSTOTAL_API_KEY, 'Optional. VIRUSTOTAL_API_KEY.'],

src/routes/auth.tsx changed

11 import type { Hono } from 'hono';
22 import type { AppEnv, Ctx, User } from '../env';
3- import { mail } from '../lib/email';
3+ import { finishRegistration, finishSignIn, startRegistration, startSignIn, type RegisterMode } from '../lib/biolock';
44 import { ipKey, rateLimit } from '../lib/ratelimit';
5- import { clearCookie, createSession, destroySession, getSigned, setFlash, setSigned } from '../lib/session';
6- import { getUserById, handleProblem, isAdminGithubId, uniqueHandle } from '../lib/users';
7- import { SPROUT_ID } from '../lib/skills';
8- import { HttpError, newId, now, randomToken, safeEqual, safeNext, sha256B64url } from '../lib/util';
5+ import { createSession, destroySession, setFlash } from '../lib/session';
6+ import { getUserById, handleProblem } from '../lib/users';
7+ import { HttpError, newId, now, safeNext } from '../lib/util';
98 import { brandMark, icon } from '../views/art';
109 import { render } from '../views/layout';
1110
12- type Provider = 'github' | 'google';
13- type Tx = { provider: Provider; state: string; verifier: string; next: string; link: boolean };
14- type Identity = { provider: Provider; id: string; login: string | null; name: string | null; email: string | null; emailVerified: boolean; avatar: string | null };
15- type PendingLink = Identity & { existingProviders: string[] };
16-
17- const PROVIDER_NAME: Record<Provider, string> = { github: 'GitHub', google: 'Google' };
18-
19- export function providerReady(c: Ctx, p: Provider): boolean {
20- return p === 'github' ? !!(c.env.GITHUB_CLIENT_ID && c.env.GITHUB_CLIENT_SECRET) : !!(c.env.GOOGLE_CLIENT_ID && c.env.GOOGLE_CLIENT_SECRET);
21- }
22-
23- function callbackUrl(c: Ctx, p: Provider): string {
24- return `${new URL(c.req.url).origin}/auth/${p}/callback`;
25- }
11+ /** The BioLock buttons. public/js/biolock-page.js does the work; without a fingerprint or face reader it says so. */
12+ const BioLockButtons = ({ next }: { next: string }) => (
13+ <div class="signin-buttons" data-biolock data-next={next}>
14+ <button type="button" class="btn btn-primary btn-provider" data-biolock-signin>
15+ {icon('lock', 20)}
16+ <span>Sign in with BioLock</span>
17+ </button>
18+ <button type="button" class="btn btn-ghost btn-provider" data-biolock-register="new">
19+ <span>New here? Create an account with BioLock</span>
20+ </button>
21+ <p class="fine biolock-status" data-biolock-status role="status" aria-live="polite"></p>
22+ </div>
23+ );
2624
27- async function exchange(c: Ctx, p: Provider, code: string, verifier: string): Promise<Identity> {
28- if (p === 'github') {
29- const tokenRes = await fetch('https://github.com/login/oauth/access_token', {
30- method: 'POST',
31- headers: { accept: 'application/json', 'content-type': 'application/json', 'user-agent': 'skillfarm' },
32- body: JSON.stringify({ client_id: c.env.GITHUB_CLIENT_ID, client_secret: c.env.GITHUB_CLIENT_SECRET, code, redirect_uri: callbackUrl(c, p), code_verifier: verifier }),
33- });
34- const tok = (await tokenRes.json()) as { access_token?: string };
35- if (!tok.access_token) throw new HttpError(400, 'GitHub did not complete the sign-in. Try again.');
36- const h = { authorization: `Bearer ${tok.access_token}`, accept: 'application/vnd.github+json', 'user-agent': 'skillfarm' };
37- const [uRes, eRes] = await Promise.all([fetch('https://api.github.com/user', { headers: h }), fetch('https://api.github.com/user/emails', { headers: h })]);
38- if (!uRes.ok) throw new HttpError(502, 'Could not read your GitHub profile. Try again.');
39- const u = (await uRes.json()) as { id: number; login: string; name: string | null; avatar_url: string | null };
40- const emails = eRes.ok ? ((await eRes.json()) as { email: string; primary: boolean; verified: boolean }[]) : [];
41- const primary = Array.isArray(emails) ? emails.find((e) => e.primary && e.verified) : undefined;
42- return { provider: p, id: String(u.id), login: u.login, name: u.name, email: primary?.email.toLowerCase() ?? null, emailVerified: !!primary, avatar: u.avatar_url ? `https://avatars.githubusercontent.com/u/${u.id}?s=256&v=4` : null };
25+ async function json(c: Ctx): Promise<Record<string, unknown>> {
26+ try {
27+ const v = await c.req.json();
28+ return v && typeof v === 'object' ? (v as Record<string, unknown>) : {};
29+ } catch {
30+ return {};
4331 }
44- const tokenRes = await fetch('https://oauth2.googleapis.com/token', {
45- method: 'POST',
46- headers: { 'content-type': 'application/x-www-form-urlencoded' },
47- body: new URLSearchParams({ client_id: c.env.GOOGLE_CLIENT_ID!, client_secret: c.env.GOOGLE_CLIENT_SECRET!, code, code_verifier: verifier, grant_type: 'authorization_code', redirect_uri: callbackUrl(c, p) }),
48- });
49- const tok = (await tokenRes.json()) as { access_token?: string };
50- if (!tok.access_token) throw new HttpError(400, 'Google did not complete the sign-in. Try again.');
51- const uRes = await fetch('https://openidconnect.googleapis.com/v1/userinfo', { headers: { authorization: `Bearer ${tok.access_token}` } });
52- if (!uRes.ok) throw new HttpError(502, 'Could not read your Google profile. Try again.');
53- const u = (await uRes.json()) as { sub: string; email?: string; email_verified?: boolean };
54- // Only the id and verified email are kept from Google. The name and photo are not stored.
55- return { provider: p, id: u.sub, login: null, name: null, email: u.email?.toLowerCase() ?? null, emailVerified: !!u.email_verified, avatar: null };
5632 }
5733
58- async function linkIdentity(c: Ctx, userId: string, id: Identity): Promise<void> {
59- await c.env.DB.prepare('INSERT OR IGNORE INTO oauth_accounts (provider, provider_user_id, user_id, login, email, email_verified, created_at) VALUES (?,?,?,?,?,?,?)')
60- .bind(id.provider, id.id, userId, id.login, id.emailVerified ? id.email : null, id.emailVerified ? 1 : 0, now())
61- .run();
62- }
63-
64- async function afterSignIn(c: Ctx, user: User, id: Identity, next: string): Promise<Response> {
65- const sets: string[] = [];
66- const args: unknown[] = [];
67- if (id.emailVerified && id.email && !user.email) { sets.push('email = ?'); args.push(id.email); }
68- if (id.provider === 'github') {
69- if (isAdminGithubId(c.env, id.id) && !user.is_admin) sets.push('is_admin = 1');
70- if (id.avatar && !user.is_agent && user.avatar_fallback !== id.avatar) { sets.push('avatar_fallback = ?'); args.push(id.avatar); }
71- await c.env.DB.prepare("UPDATE oauth_accounts SET login = ?, email = COALESCE(?, email), email_verified = MAX(email_verified, ?) WHERE provider = 'github' AND provider_user_id = ?")
72- .bind(id.login, id.emailVerified ? id.email : null, id.emailVerified ? 1 : 0, id.id)
73- .run();
74- }
75- if (sets.length) await c.env.DB.prepare(`UPDATE users SET ${sets.join(', ')} WHERE id = ?`).bind(...args, user.id).run();
76-
77- // Finish a link that was waiting for proof of control of the existing account.
78- const pending = await getSigned<PendingLink>(c, 'sf_link');
79- if (pending) {
80- clearCookie(c, 'sf_link');
81- if (pending.provider !== id.provider) {
82- const taken = await c.env.DB.prepare('SELECT user_id FROM oauth_accounts WHERE provider = ? AND provider_user_id = ?').bind(pending.provider, pending.id).first();
83- if (!taken) {
84- await linkIdentity(c, user.id, pending);
85- setFlash(c, 'ok', `${PROVIDER_NAME[pending.provider]} is now linked to your account.`);
86- }
87- }
88- }
89- await createSession(c, user.id);
90- return c.redirect(user.onboarded ? next : `/welcome?next=${encodeURIComponent(next)}`);
34+ async function limit(c: Ctx, key: string, n: number, windowSec: number): Promise<void> {
35+ const ip = await ipKey(c.env, c.req.header('cf-connecting-ip'));
36+ if (!(await rateLimit(c.env, `${key}:${ip}`, n, windowSec))) throw new HttpError(429, 'Too many tries from this network. Try again later.');
9137 }
9238
93- const SignInButtons = ({ c, next, link }: { c: Ctx; next: string; link?: boolean }) => (
94- <div class="signin-buttons">
95- {(['github', 'google'] as Provider[]).map((p) =>
96- providerReady(c, p) ? (
97- <a class={`btn btn-provider btn-${p}`} href={`/auth/${p}/start?next=${encodeURIComponent(next)}${link ? '&link=1' : ''}`}>
98- {icon(p, 20)}
99- <span>Continue with {PROVIDER_NAME[p]}</span>
100- </a>
101- ) : (
102- <span class={`btn btn-provider btn-${p} is-disabled`} aria-disabled="true">
103- {icon(p, 20)}
104- <span>{PROVIDER_NAME[p]} sign-in is being set up</span>
105- </span>
106- ),
107- )}
108- </div>
109- );
110-
11139 export function registerAuth(app: Hono<AppEnv>) {
11240 app.get('/signin', (c) => {
11341 const next = safeNext(c.req.query('next'));
⋯
11947 {brandMark(56)}
12048 <h1>Sign in to Skillfarm</h1>
12149 <p class="lede">Share skills, earn Seeds and build your portfolio. It is free.</p>
122- <SignInButtons c={c} next={next} />
50+ <BioLockButtons next={next} />
12351 <p class="fine">
124- No passwords. Skillfarm keeps your provider account id and verified email, and uses the email only for notices about your skills. See the <a href="/privacy">privacy page</a>.
52+ BioLock signs you in with the fingerprint or face reader built into your own device. There is no password to remember, steal or leak, and Skillfarm never sees your fingerprint or face: your device checks it and only proves the result. See the <a href="/privacy">privacy page</a>.
12553 </p>
54+ <p class="fine">Had an account from before BioLock? Create a new account with BioLock here. If you need your old skills moved to it, use Report on any skill page and tell us your old handle.</p>
12655 {c.env.DEV_LOGIN === '1' && ['localhost', '127.0.0.1'].includes(new URL(c.req.url).hostname) ? (
12756 <p class="fine">
12857 Local development: <a href="/dev/login?as=dev-grower">sign in as a test member</a> or <a href="/dev/login?as=dev-admin&admin=1">as a test admin</a>.
⋯
13261 );
13362 });
13463
135- app.get('/auth/:provider/start', async (c) => {
136- const p = c.req.param('provider') as Provider;
137- if (p !== 'github' && p !== 'google') throw new HttpError(404, 'Unknown sign-in provider.');
138- if (!providerReady(c, p)) throw new HttpError(503, `${PROVIDER_NAME[p]} sign-in is not set up yet.`);
139- const ip = await ipKey(c.env, c.req.header('cf-connecting-ip'));
140- if (!(await rateLimit(c.env, `auth:${ip}`, 30, 3600))) throw new HttpError(429, 'Too many sign-in attempts. Try again later.');
141- const tx: Tx = { provider: p, state: randomToken(24), verifier: randomToken(48), next: safeNext(c.req.query('next')), link: c.req.query('link') === '1' };
142- await setSigned(c, 'sf_oauth', tx, 600);
143- const challenge = await sha256B64url(tx.verifier);
144- const u = new URL(p === 'github' ? 'https://github.com/login/oauth/authorize' : 'https://accounts.google.com/o/oauth2/v2/auth');
145- u.searchParams.set('client_id', (p === 'github' ? c.env.GITHUB_CLIENT_ID : c.env.GOOGLE_CLIENT_ID)!);
146- u.searchParams.set('redirect_uri', callbackUrl(c, p));
147- u.searchParams.set('state', tx.state);
148- u.searchParams.set('code_challenge', challenge);
149- u.searchParams.set('code_challenge_method', 'S256');
150- if (p === 'github') {
151- u.searchParams.set('scope', 'read:user user:email');
152- } else {
153- u.searchParams.set('response_type', 'code');
154- u.searchParams.set('scope', 'openid email');
155- u.searchParams.set('prompt', 'select_account');
156- }
157- return c.redirect(u.toString());
158- });
159-
160- app.get('/auth/:provider/callback', async (c) => {
161- const p = c.req.param('provider') as Provider;
162- const tx = await getSigned<Tx>(c, 'sf_oauth');
163- clearCookie(c, 'sf_oauth');
164- const state = c.req.query('state') ?? '';
165- const code = c.req.query('code');
166- if (c.req.query('error')) {
167- setFlash(c, 'error', 'Sign-in was cancelled.');
168- return c.redirect('/signin');
169- }
170- if (!tx || tx.provider !== p || !code || !safeEqual(tx.state, state)) throw new HttpError(400, 'That sign-in link expired. Start again from the sign-in page.');
171- const id = await exchange(c, p, code, tx.verifier);
172- const current = c.get('user');
173- const existing = await c.env.DB.prepare('SELECT user_id FROM oauth_accounts WHERE provider = ? AND provider_user_id = ?').bind(p, id.id).first<{ user_id: string }>();
174-
175- if (existing) {
176- if (current && existing.user_id !== current.id) {
177- setFlash(c, 'error', `That ${PROVIDER_NAME[p]} account is already linked to a different Skillfarm account.`);
178- return c.redirect('/settings');
179- }
180- const user = await getUserById(c.env, existing.user_id);
181- if (!user || user.status !== 'active') throw new HttpError(403, 'This account is not active.');
182- return afterSignIn(c, user, id, tx.next);
183- }
64+ app.get('/biolock/add', (c) =>
65+ render(
66+ c,
67+ { title: 'Add BioLock on this device', noindex: true, narrow: true },
68+ <section class="auth-card card">
69+ {brandMark(56)}
70+ <h1>Add BioLock on this device</h1>
71+ <p class="lede">This one-time link adds this device's fingerprint or face reader to your Skillfarm account. After that, this device signs you in on its own.</p>
72+ <div class="signin-buttons" data-biolock data-next="/settings">
73+ <button type="button" class="btn btn-primary btn-provider" data-biolock-register="link">
74+ {icon('lock', 20)}
75+ <span>Add BioLock on this device</span>
76+ </button>
77+ <p class="fine biolock-status" data-biolock-status role="status" aria-live="polite"></p>
78+ </div>
79+ <p class="fine">The link works once, for ten minutes. If it has expired, make a new one in Settings on a device that is signed in.</p>
80+ </section>,
81+ ),
82+ );
18483
185- if (current) {
186- // Signed in and adding a second provider from settings.
187- await linkIdentity(c, current.id, id);
188- setFlash(c, 'ok', `${PROVIDER_NAME[p]} is now linked to your account.`);
189- return c.redirect('/settings');
190- }
84+ app.post('/api/biolock/signin/options', async (c) => {
85+ await limit(c, 'biolock-signin', 60, 3600);
86+ const body = await json(c);
87+ return c.json(await startSignIn(c, body.ids));
88+ });
19189
192- if (p === 'github' && isAdminGithubId(c.env, id.id)) {
193- // The site owner runs Skillfarm as Sprout and keeps no member account of their own.
194- const sprout = await getUserById(c.env, SPROUT_ID);
195- if (sprout && sprout.status === 'active') {
196- await linkIdentity(c, sprout.id, id);
197- return afterSignIn(c, sprout, id, tx.next);
198- }
199- }
90+ app.post('/api/biolock/signin/verify', async (c) => {
91+ await limit(c, 'biolock-signin', 60, 3600);
92+ const body = await json(c);
93+ const user = await finishSignIn(c, body.challengeId, body.response);
94+ await createSession(c, user.id);
95+ const next = safeNext(typeof body.next === 'string' ? body.next : '/');
96+ return c.json({ ok: true, next: user.onboarded ? next : `/welcome?next=${encodeURIComponent(next)}` });
97+ });
20098
201- if (id.emailVerified && id.email) {
202- // Same verified email as an existing member: never merge silently. Ask for proof of control of that account first.
203- const match = await c.env.DB.prepare(
204- `SELECT u.id FROM users u WHERE u.status = 'active' AND (u.email = ?1 OR u.id IN (SELECT user_id FROM oauth_accounts WHERE email = ?1 AND email_verified = 1)) LIMIT 1`,
205- ).bind(id.email).first<{ id: string }>();
206- if (match) {
207- const provs = await c.env.DB.prepare('SELECT provider FROM oauth_accounts WHERE user_id = ?').bind(match.id).all<{ provider: Provider }>();
208- const existingProviders = provs.results.map((r) => r.provider);
209- await setSigned(c, 'sf_link', { ...id, existingProviders } satisfies PendingLink, 600);
210- const other = existingProviders[0] ?? 'github';
211- return render(
212- c,
213- { title: 'Link your accounts', noindex: true, narrow: true },
214- <section class="auth-card card">
215- {brandMark(56)}
216- <h1>This email already has a Skillfarm account</h1>
217- <p class="lede">
218- Sign in with {PROVIDER_NAME[other]} to link {PROVIDER_NAME[p]} to it. After that, either one signs you in.
219- </p>
220- <div class="signin-buttons">
221- <a class={`btn btn-provider btn-${other}`} href={`/auth/${other}/start?next=${encodeURIComponent(tx.next)}`}>
222- {icon(other, 20)}
223- <span>Continue with {PROVIDER_NAME[other]}</span>
224- </a>
225- </div>
226- <p class="fine">Skillfarm does not merge accounts on a matching email alone, so nobody can take over an account by adding your address elsewhere.</p>
227- </section>,
228- );
229- }
230- }
99+ app.post('/api/biolock/register/options', async (c) => {
100+ const body = await json(c);
101+ const mode = (['new', 'add', 'link'] as RegisterMode[]).find((m) => m === body.mode);
102+ if (!mode) throw new HttpError(400, 'Unknown request.');
103+ await limit(c, 'biolock-register', 30, 3600);
104+ return c.json(await startRegistration(c, mode, body.token));
105+ });
231106
232- const ip = await ipKey(c.env, c.req.header('cf-connecting-ip'));
233- if (!(await rateLimit(c.env, `signup:${ip}`, 5, 86400))) throw new HttpError(429, 'Too many new accounts from this network today.');
234- const userId = newId();
235- const handle = await uniqueHandle(c.env, id.login ?? `grower-${newId(5)}`);
236- const displayName = (id.name || id.login || 'New grower').slice(0, 60);
237- const admin = p === 'github' && isAdminGithubId(c.env, id.id) ? 1 : 0;
238- await c.env.DB.batch([
239- c.env.DB.prepare('INSERT INTO users (id, handle, display_name, avatar_fallback, email, is_admin, created_at) VALUES (?,?,?,?,?,?,?)').bind(userId, handle, displayName, id.avatar, id.emailVerified ? id.email : null, admin, now()),
240- c.env.DB.prepare('INSERT INTO oauth_accounts (provider, provider_user_id, user_id, login, email, email_verified, created_at) VALUES (?,?,?,?,?,?,?)').bind(p, id.id, userId, id.login, id.emailVerified ? id.email : null, id.emailVerified ? 1 : 0, now()),
241- ]);
242- const user = (await getUserById(c.env, userId))!;
243- c.executionCtx.waitUntil(mail.welcome(c.env, user, handle).catch(() => false));
244- await createSession(c, userId);
245- return c.redirect(`/welcome?next=${encodeURIComponent(tx.next)}`);
107+ app.post('/api/biolock/register/verify', async (c) => {
108+ const body = await json(c);
109+ const name = typeof body.name === 'string' ? body.name.replace(/[^\w .,'-]/g, '').trim() || 'Device' : 'Device';
110+ await limit(c, 'biolock-register', 30, 3600);
111+ // A new account is only made once the device has proved it holds a working reader.
112+ const peek = typeof body.challengeId === 'string' ? await c.env.DB.prepare('SELECT kind FROM biolock_challenges WHERE id = ?').bind(body.challengeId).first<{ kind: string }>() : null;
113+ if (peek?.kind === 'new') await limit(c, 'signup', 5, 86400);
114+ const { userId, created } = await finishRegistration(c, body.challengeId, body.response, name);
115+ const signedIn = c.get('user');
116+ if (!signedIn || signedIn.id !== userId) await createSession(c, userId);
117+ const next = safeNext(typeof body.next === 'string' ? body.next : '/');
118+ if (created) return c.json({ ok: true, next: `/welcome?next=${encodeURIComponent(next)}` });
119+ setFlash(c, 'ok', 'BioLock is now on this device.');
120+ return c.json({ ok: true, next: signedIn ? '/settings#biolock' : next });
246121 });
247122
248123 app.post('/signout', async (c) => {
⋯
302177 return c.redirect(next === '/' ? `/u/${handle}` : next);
303178 });
304179
305- // Local development only: lets the test suite sign in without a real OAuth provider.
180+ // Local development only: lets the test suite sign in without a fingerprint or face reader.
306181 app.get('/dev/login', async (c) => {
307182 const host = new URL(c.req.url).hostname;
308183 if (c.env.DEV_LOGIN !== '1' || !['localhost', '127.0.0.1'].includes(host)) throw new HttpError(404, 'Not found.');
⋯
313188 if (user?.is_agent) throw new HttpError(404, 'Not found.');
314189 if (!user) {
315190 const id = newId();
316- await c.env.DB.batch([
317- c.env.DB.prepare('INSERT INTO users (id, handle, display_name, email, is_admin, onboarded, created_at) VALUES (?,?,?,?,?,1,?)').bind(id, handle, handle.replace(/-/g, ' '), `${handle}@example.test`, admin, now() - age * 86400),
318- c.env.DB.prepare("INSERT INTO oauth_accounts (provider, provider_user_id, user_id, login, email, email_verified, created_at) VALUES ('github',?,?,?,?,1,?)").bind(`dev-${id}`, id, handle, `${handle}@example.test`, now()),
319- ]);
191+ await c.env.DB.prepare('INSERT INTO users (id, handle, display_name, email, is_admin, onboarded, created_at) VALUES (?,?,?,?,?,1,?)').bind(id, handle, handle.replace(/-/g, ' '), `${handle}@example.test`, admin, now() - age * 86400).run();
320192 user = (await getUserById(c.env, id))!;
321193 }
322194 await createSession(c, user.id);
323195 return c.redirect(safeNext(c.req.query('next')));
324196 });
325197 }
326-
327- export { SignInButtons };

src/routes/mcp.ts changed

131131 category: { type: 'string', enum: CATEGORIES.map((k) => k.key), description: 'Only skills in this category.' },
132132 from: { type: 'string', enum: ['growers', 'sprout'], description: 'Only skills shared by members ("growers") or only Sprout\'s picks ("sprout"). Default is both.' },
133133 by: { type: 'string', description: 'Only skills shared by this member, as a handle without the @, for example "sprout".' },
134- maker: { type: 'string', description: 'Only skills made by a person or company whose name contains this, for example "Anthropic", "OpenAI" or "Cloudflare". Matches a pick\'s maker, the owner of the repo, or the member who shared it.' },
134+ maker: { type: 'string', description: 'Only skills made by a person or company whose name contains this, for example "an AI lab" or "a cloud company". Matches a pick\'s maker, the owner of the repo, or the member who shared it.' },
135135 repo: { type: 'string', description: 'Only skills from this repo, as "owner/name".' },
136136 license: { type: 'string', description: 'Only skills under this licence, as an SPDX id such as "MIT" or "Apache-2.0".' },
137137 sort: { type: 'string', enum: ['trending', 'top', 'new'], description: 'Default is trending.' },

src/routes/oauth.tsx changed

213213 </ul>
214214 <p class="fine">
215215 {write ? 'Skills shared through this app go to the review queue like any other. ' : ''}
216- The app never sees your GitHub or Google sign-in, and you can disconnect it any time in Settings. Only allow this if you started the connection yourself.
216+ The app never sees your BioLock, and you can disconnect it any time in Settings. Only allow this if you started the connection yourself.
217217 </p>
218218 <form method="post" action="/oauth/authorize" class="form">
219219 <input type="hidden" name="client_id" value={p.client.client_id} />

src/routes/pages.tsx changed

155155 <div>
156156 <h2 class="section-title" id="picks-title">Sprout's picks</h2>
157157 <p>
158- Sprout is the farm's agent. It reads what people are building and recommends skills worth planting. Every pick names its maker and their repo.
158+ Sprout is the farm's agent. It reads what people are building and recommends skills worth planting. Every pick says what kind of maker made it and installs from the maker's own copy.
159159 </p>
160160 </div>
161161 <a class="btn btn-ghost" href="/skills?from=sprout">See all picks</a>
⋯
571571 <p class="lede">Skillfarm keeps as little about you as it can. This page lists all of it.</p>
572572 <h2>What is stored when you sign in</h2>
573573 <ul>
574- <li><strong>Your provider account id</strong> from GitHub or Google, so the same account signs you in next time.</li>
575- <li><strong>Your verified email address.</strong> It is used only to send notices about your skills and account, such as approved or denied. It is never shown on the site and never shared. You can turn notices off in settings.</li>
576- <li><strong>From GitHub only:</strong> your public username, public display name and public avatar, to start your profile. You can change or replace all three.</li>
577- <li><strong>From Google:</strong> nothing else. Your Google name and photo are not stored.</li>
574+ <li><strong>A BioLock public key for each device you add.</strong> Your device makes a key pair when you add it. The private half never leaves the device. Skillfarm keeps only the public half, plus the device type you added it from (such as Phone or Computer) and when it was added and last used.</li>
575+ <li><strong>Nothing about your fingerprint or face.</strong> Your device checks it on its own and only tells Skillfarm that the check passed. Your fingerprint and face never leave the device and Skillfarm never sees them.</li>
576+ <li><strong>No email address</strong> for new accounts. Accounts made before BioLock may still hold the email they were made with. It is used only for notices about your skills and account, is never shown or shared, and you can turn notices off in settings.</li>
578577 </ul>
579- <p>There are no passwords. Skillfarm never asks GitHub for access to your repositories.</p>
578+ <p>There are no passwords and no outside sign-in services. Nothing about you is shared with another company when you sign in.</p>
580579 <h2>What you add yourself</h2>
581580 <p>Your handle, display name, bio, website, avatar, skills, reviews and likes. Profiles and live skills are public.</p>
582581 <h2>Sessions and tokens</h2>

src/routes/settings.tsx changed

55 import { destroySession, setFlash } from '../lib/session';
66 import { cleanScopes, createToken, SCOPE_TEXT, SCOPES } from '../lib/tokens';
77 import { handleProblem } from '../lib/users';
8- import { HttpError, newId, now, safeUrl, sha256Hex, timeAgo } from '../lib/util';
8+ import { dateLabel, HttpError, newId, now, safeUrl, sha256Hex, timeAgo } from '../lib/util';
99 import { icon } from '../views/art';
1010 import { Avatar, Copy } from '../views/components';
1111 import { render } from '../views/layout';
12- import { providerReady } from './auth';
12+ import { credentialsFor, LINK_MINUTES, makeLink } from '../lib/biolock';
1313
1414 function requireUser(c: Ctx): User {
1515 const u = c.get('user');
⋯
4646 app.get('/settings', async (c) => {
4747 const user = c.get('user');
4848 if (!user) return c.redirect('/signin?next=/settings');
49- const [accounts, tokens, grants] = await Promise.all([
50- c.env.DB.prepare('SELECT provider, login FROM oauth_accounts WHERE user_id = ?').bind(user.id).all<{ provider: 'github' | 'google'; login: string | null }>(),
49+ const [devices, tokens, grants] = await Promise.all([
50+ credentialsFor(c, user.id),
5151 c.env.DB.prepare("SELECT id, name, scopes, last_used_at, created_at FROM api_tokens WHERE user_id = ? AND kind = 'pat' AND revoked_at IS NULL ORDER BY created_at DESC").bind(user.id).all<{ id: string; name: string; scopes: string; last_used_at: number | null; created_at: number }>(),
5252 c.env.DB.prepare(
5353 `SELECT t.grant_id, t.scopes, MAX(t.last_used_at) AS last_used_at, MIN(t.created_at) AS created_at, COALESCE(cl.client_name, 'Unknown app') AS client_name
⋯
5555 WHERE t.user_id = ? AND t.kind = 'refresh' AND t.revoked_at IS NULL AND (t.expires_at IS NULL OR t.expires_at > ?) GROUP BY t.grant_id ORDER BY created_at DESC`,
5656 ).bind(user.id, now()).all<{ grant_id: string; scopes: string; last_used_at: number | null; created_at: number; client_name: string }>(),
5757 ]);
58- const linked = new Set(accounts.results.map((a) => a.provider));
5958 return render(
6059 c,
6160 { title: 'Settings', noindex: true },
⋯
107106
108107 <section class="card pad">
109108 <h2>Email notices</h2>
110- <p>{user.email ? <>Notices go to <strong>{user.email}</strong>, the verified address from your sign-in provider. It is never shown on the site.</> : 'Your sign-in provider did not share a verified email, so Skillfarm cannot email you.'}</p>
109+ <p>{user.email ? <>Notices go to <strong>{user.email}</strong>. It is never shown on the site.</> : 'Skillfarm has no email address for you, so it cannot email you. Notices still show on the site.'}</p>
111110 <form method="post" action="/settings/notices" class="form">
112111 <label class="confirm">
113112 <input type="checkbox" name="email_notices" value="1" checked={!!user.email_notices} />
⋯
117116 </form>
118117 </section>
119118
120- <section class="card pad">
121- <h2>Sign-in methods</h2>
122- <ul class="rows">
123- {(['github', 'google'] as const).map((p) => {
124- const acct = accounts.results.find((a) => a.provider === p);
125- const name = p === 'github' ? 'GitHub' : 'Google';
126- return (
119+ <section class="card pad" id="biolock">
120+ <h2>BioLock</h2>
121+ <p class="muted">Each device signs you in with its own fingerprint or face reader. Add every device you use, so losing one never locks you out.</p>
122+ {devices.length ? (
123+ <ul class="rows">
124+ {devices.map((d) => (
127125 <li>
128- <span class="row-main">{icon(p, 20)} <strong>{name}</strong> {acct ? <em>{acct.login ? `@${acct.login}` : 'Linked'}</em> : <em>Not linked</em>}</span>
129- {acct ? (
130- linked.size > 1 ? (
131- <form method="post" action={`/settings/unlink/${p}`}>
132- <button class="btn btn-ghost btn-sm" type="submit">Unlink</button>
133- </form>
134- ) : (
135- <span class="muted">Your only sign-in method</span>
136- )
137- ) : providerReady(c, p) ? (
138- <a class="btn btn-ghost btn-sm" href={`/auth/${p}/start?link=1&next=/settings`}>Link {name}</a>
126+ <span class="row-main">{icon('lock', 20)} <strong>{d.name || 'Device'}</strong> <em>added {dateLabel(d.created_at)}</em> <em>last used {timeAgo(d.last_used_at)}</em></span>
127+ {devices.length > 1 ? (
128+ <form method="post" action={`/settings/biolock/${encodeURIComponent(d.id)}/remove`}>
129+ <button class="btn btn-ghost btn-sm" type="submit">Remove</button>
130+ </form>
139131 ) : (
140- <span class="muted">Being set up</span>
132+ <span class="muted">Your only device</span>
141133 )}
142134 </li>
143- );
144- })}
145- </ul>
135+ ))}
136+ </ul>
137+ ) : (
138+ <p class="notice notice-info">This account has no BioLock yet. Add it on this device now, or you will not be able to sign in again after this session ends.</p>
139+ )}
140+ <div class="signin-buttons" data-biolock data-next="/settings#biolock">
141+ <button type="button" class="btn btn-primary btn-sm" data-biolock-register="add">{icon('lock', 18)} Add BioLock on this device</button>
142+ <p class="fine biolock-status" data-biolock-status role="status" aria-live="polite"></p>
143+ </div>
144+ <form method="post" action="/settings/biolock/link" class="form">
145+ <button class="btn btn-ghost btn-sm" type="submit">Make a one-time link for another device</button>
146+ </form>
146147 </section>
147148
148149 <section class="card pad" id="access">
⋯
282283 });
283284 });
284285
285- app.post('/settings/unlink/:provider', async (c) => {
286+ app.post('/settings/biolock/link', async (c) => {
286287 const user = requireUser(c);
287- const p = c.req.param('provider');
288- const count = await c.env.DB.prepare('SELECT COUNT(*) AS n FROM oauth_accounts WHERE user_id = ?').bind(user.id).first<{ n: number }>();
289- if ((count?.n ?? 0) < 2) {
290- setFlash(c, 'error', 'You cannot unlink your only sign-in method.');
291- return c.redirect('/settings');
288+ if (!(await rateLimit(c.env, `biolock-link:${user.id}`, 10, 3600))) throw new HttpError(429, 'Too many links. Try again later.');
289+ const link = await makeLink(c, user.id);
290+ return render(
291+ c,
292+ { title: 'Add another device', noindex: true, narrow: true },
293+ <section class="auth-card card">
294+ <h1>Open this link on the other device</h1>
295+ <p class="lede">Send it to yourself, open it on the device you want to add, and use that device's fingerprint or face. It works once, for {LINK_MINUTES} minutes.</p>
296+ <Copy text={link} label="Copy link" />
297+ <a class="btn btn-ghost" href="/settings#biolock">Back to settings</a>
298+ </section>,
299+ );
300+ });
301+
302+ app.post('/settings/biolock/:id/remove', async (c) => {
303+ const user = requireUser(c);
304+ const devices = await credentialsFor(c, user.id);
305+ const id = c.req.param('id');
306+ if (devices.length < 2 || !devices.some((d) => d.id === id)) {
307+ setFlash(c, 'error', 'You cannot remove your only device. Add another one first.');
308+ return c.redirect('/settings#biolock');
292309 }
293- await c.env.DB.prepare('DELETE FROM oauth_accounts WHERE user_id = ? AND provider = ?').bind(user.id, p).run();
294- setFlash(c, 'ok', 'Sign-in method unlinked.');
295- return c.redirect('/settings');
310+ await c.env.DB.prepare('DELETE FROM biolock_credentials WHERE id = ? AND user_id = ?').bind(id, user.id).run();
311+ setFlash(c, 'ok', 'Device removed. It can no longer sign in.');
312+ return c.redirect('/settings#biolock');
296313 });
297314
298315 app.post('/settings/tokens', async (c) => {
⋯
354371 c.env.DB.prepare("UPDATE skills SET state = 'removed', featured_at = NULL, updated_at = ? WHERE owner_id = ?").bind(ts, user.id),
355372 c.env.DB.prepare("UPDATE skill_versions SET status = 'superseded' WHERE status = 'pending' AND skill_id IN (SELECT id FROM skills WHERE owner_id = ?)").bind(user.id),
356373 c.env.DB.prepare('DELETE FROM oauth_accounts WHERE user_id = ?').bind(user.id),
374+ c.env.DB.prepare('DELETE FROM biolock_credentials WHERE user_id = ?').bind(user.id),
375+ c.env.DB.prepare('DELETE FROM biolock_links WHERE user_id = ?').bind(user.id),
357376 c.env.DB.prepare('DELETE FROM sessions WHERE user_id = ?').bind(user.id),
358377 c.env.DB.prepare('UPDATE api_tokens SET revoked_at = ? WHERE user_id = ? AND revoked_at IS NULL').bind(ts, user.id),
359378 c.env.DB.prepare(

src/routes/skills.tsx changed

106106 <form method="post" action="/share" class="form card pad share-form" data-share-form>
107107 <label>
108108 <span>{icon('fork', 18)} Your public repo</span>
109- <input name="repo_url" type="text" inputmode="url" required placeholder="https://github.com/you/your-skills" value={v.repo_url ?? ''} autocapitalize="none" spellcheck={false} />
109+ <input name="repo_url" type="text" inputmode="url" required placeholder="Your public repo's address" value={v.repo_url ?? ''} autocapitalize="none" spellcheck={false} />
110110 <small>
111111 The repo has to be public. Every folder with a SKILL.md in it counts as one skill, up to {REPO_SKILL_LIMIT} at a time. Skillfarm copies each SKILL.md and the text files beside it. Stars from the repo show on your skills.
112112 </small>
⋯
352352 <dl class="facts">
353353 <dt>Maker</dt>
354354 <dd>{maker}</dd>
355- {skill.github_repo ? (
355+ {own ? (
356356 <>
357357 <dt>Repo</dt>
358+ <dd><a href={repoWebUrl(skill.github_repo!)} rel="noopener">{repoLabel(skill.github_repo!)}</a></dd>
359+ </>
360+ ) : repo?.unavailable || repo?.archived ? (
361+ <>
362+ <dt>Repo</dt>
358363 <dd>
359- {own ? <a href={repoWebUrl(skill.github_repo)} rel="noopener">{repoLabel(skill.github_repo)}</a> : <span>{repoLabel(skill.github_repo)}</span>}
360364 {repo?.unavailable ? <span class="pill pill-rejected">Repo unavailable</span> : null}
361365 {repo?.archived ? <span class="pill">Archived</span> : null}
362366 </dd>
⋯
380384 <AgentBadge />
381385 {skill.pick_note ? <p>{skill.pick_note}</p> : null}
382386 <p class="fine">
383- Sprout is the Skillfarm agent. This skill belongs to {maker}. {copy ? 'Skillfarm keeps a converted copy for other agents, described below.' : "Skillfarm hosts no copy, so you always install the maker's current version."}{own ? '' : ' Stars are for the whole repo.'}
387+ Sprout is the Skillfarm agent. This skill belongs to its maker. {copy ? 'Skillfarm keeps a converted copy for other agents, described below.' : "Skillfarm hosts no copy, so you always install the maker's current version."}{own ? '' : ' Stars are for the whole repo.'}
384388 </p>
385389 </section>
386390
387391 {copy ? (
388392 <section class="card pad install multi-copy" id="multi-agent">
389393 <h2>Multi-agent version</h2>
390- <p class="muted">
391- A copy of this skill, converted by Skillfarm so it reads the same in every major coding agent. {maker} wrote it and keeps the credit. The author's text is unchanged, and{' '}
392- {isOurs(copy.notice_url) ? <a href={copy.notice_url} rel="noopener">the notice lists every change</a> : 'the notice lists every change'}.
393- </p>
394+ <p class="muted">A copy of this skill, converted by Skillfarm so it reads the same in every major coding agent. The author's text is unchanged.</p>
394395 <SendToAgent options={copySendOptions(c.env.SITE_URL, skill, copy)} />
395396 <div class="tabset" data-tabset data-agent-tabs>
396397 <div class="tabs" role="tablist">

src/views/art.ts changed

2828 menu: '<path d="M4 7h16"/><path d="M4 12h16"/><path d="M4 17h16"/>',
2929 share: '<circle cx="6.5" cy="12" r="2.3"/><circle cx="17" cy="6" r="2.3"/><circle cx="17" cy="18" r="2.3"/><path d="M8.6 10.900 14.900 7.200"/><path d="M8.6 13.100 14.900 16.800"/>',
3030 comment: '<path d="M5 5h14a1.500 1.500 0 0 1 1.500 1.500v8A1.500 1.500 0 0 1 19 16h-7l-4 3.500V16H5a1.500 1.500 0 0 1-1.500-1.500v-8A1.500 1.500 0 0 1 5 5z"/>',
31- github: '',
32- google: '',
31+ lock: '<rect x="5" y="10.5" width="14" height="10" rx="2"/><path d="M8 10.5V7.500a4 4 0 0 1 8 0v3"/><path d="M12 14.500v2"/>',
3332 };
3433
3534 // Social marks, the same ones the other sites use.
⋯
4544
4645 export function icon(name: string, size = 18, cls = '') {
4746 if (BRAND[name]) return raw(`<svg class="${cls}" width="${size}" height="${size}" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">${BRAND[name]}</svg>`);
48- if (name === 'github') {
49- return raw(`<svg class="${cls}" width="${size}" height="${size}" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2C6.480 2 2 6.580 2 12.230c0 4.520 2.870 8.350 6.840 9.710.5.090.680-.220.680-.490 0-.240-.010-.880-.010-1.730-2.780.620-3.370-1.370-3.370-1.370-.450-1.180-1.110-1.500-1.110-1.500-.910-.640.070-.620.070-.620 1 .070 1.530 1.060 1.530 1.060.890 1.560 2.340 1.110 2.910.850.090-.660.350-1.110.630-1.370-2.220-.260-4.560-1.140-4.560-5.060 0-1.120.390-2.030 1.030-2.750-.100-.260-.450-1.300.100-2.710 0 0 .840-.270 2.750 1.050a9.360 9.360 0 0 1 5 0c1.910-1.320 2.750-1.050 2.750-1.050.550 1.410.200 2.450.100 2.710.640.720 1.030 1.630 1.030 2.750 0 3.930-2.340 4.800-4.570 5.050.360.320.680.940.680 1.900 0 1.370-.010 2.470-.010 2.810 0 .270.180.590.690.490A10.130 10.130 0 0 0 22 12.230C22 6.580 17.520 2 12 2z"/></svg>`);
50- }
51- if (name === 'google') {
52- return raw(`<svg class="${cls}" width="${size}" height="${size}" viewBox="0 0 24 24" aria-hidden="true"><path fill="#4285F4" d="M21.600 12.230c0-.680-.060-1.340-.170-1.970H12v3.730h5.380a4.600 4.600 0 0 1-2 3.020v2.510h3.230c1.890-1.740 2.990-4.310 2.990-7.290z"/><path fill="#34A853" d="M12 22c2.700 0 4.960-.900 6.620-2.430l-3.230-2.510c-.900.600-2.040.960-3.390.960-2.600 0-4.810-1.760-5.600-4.120H3.060v2.590A10 10 0 0 0 12 22z"/><path fill="#FBBC05" d="M6.400 13.900a6.010 6.010 0 0 1 0-3.800V7.510H3.060a10 10 0 0 0 0 8.980L6.400 13.900z"/><path fill="#EA4335" d="M12 5.980c1.470 0 2.790.510 3.820 1.500l2.870-2.870C16.950 2.990 14.700 2 12 2a10 10 0 0 0-8.940 5.510L6.400 10.100c.790-2.360 3-4.120 5.600-4.120z"/></svg>`);
53- }
5447 const body = ICONS[name] ?? '';
5548 return raw(`<svg class="${cls}" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${body}</svg>`);
5649 }

src/views/components.tsx changed

6464 export const Stars: FC<{ skill: { github_repo: string | null; stars: number | null; repo_fetched_at: number | null; repo_unavailable: number | null } }> = ({ skill }) => {
6565 // Skillfarm's own repos are on Branchwell, which has no stars.
6666 if (!skill.github_repo || ownRepo(skill.github_repo) || skill.stars == null) return null;
67- const tip = `Stars on ${skill.github_repo}, checked ${timeAgo(skill.repo_fetched_at)}${skill.repo_unavailable ? '. Repo unavailable.' : ''}`;
67+ const tip = `Repo stars, checked ${timeAgo(skill.repo_fetched_at)}${skill.repo_unavailable ? '. Repo unavailable.' : ''}`;
6868 return (
6969 <span class="stat stat-stars" title={tip}>
7070 {icon('star', 17)}
7171 <span>{compactNumber(skill.stars)}</span>
72- <span class="sr-only">repo stars on {skill.github_repo}</span>
72+ <span class="sr-only">repo stars</span>
7373 </span>
7474 );
7575 };
⋯
9393 <a href={href}>{skill.title}</a>
9494 </h3>
9595 {showState && skill.state !== 'live' ? <span class={`pill pill-${skill.state}`}>{stateLabel(skill.state)}</span> : null}
96- {pick ? <span class="pill pill-pick" title="Recommended by Sprout, the Skillfarm agent. It names the maker's repo.">Sprout's pick</span> : null}
96+ {pick ? <span class="pill pill-pick" title="Recommended by Sprout, the Skillfarm agent.">Sprout's pick</span> : null}
9797 </div>
9898 <p class="skill-summary">{skill.summary}</p>
9999 <ul class="chips">

src/views/layout.tsx changed

116116 <link rel="preload" href="/fonts/figtree-latin-wght-normal.woff2" as="font" type="font/woff2" crossorigin="" />
117117 <link rel="stylesheet" href={`/css/site.css?v=${VERSION}`} />
118118 <script src={`/js/site.js?v=${VERSION}`} defer></script>
119+ <script type="module" src={`/js/biolock-page.js?v=${VERSION}`}></script>
119120 <link rel="stylesheet" href="/assets/visitor-odometer.v1.css" />
120121 <script defer src="/assets/visitor-odometer.v1.js"></script>
121122 <link rel="stylesheet" href="/no-orphans.css" />

test/e2e.mjs changed

187187 const r = await anon.req(p);
188188 check(`GET ${p}`, r.status === 200, String(r.status));
189189 }
190+ // Sign-in is BioLock only: the device's own fingerprint or face reader. No passwords, no outside providers.
191+ const signinHtml = await (await anon.req('/signin')).text();
192+ check('sign-in offers BioLock only', signinHtml.includes('Sign in with BioLock') && signinHtml.includes('data-biolock-register="new"') && !/github|google|passkey/i.test(signinHtml.replace(/<script[\s\S]*?<\/script>/g, '')));
193+ check('old provider sign-in routes are gone', (await anon.req('/auth/github/start')).status === 404 && (await anon.req('/auth/google/callback')).status === 404);
194+ const regOpts = await (await anon.req('/api/biolock/register/options', { method: 'POST', json: { mode: 'new' } })).json();
195+ const sel = regOpts?.options?.authenticatorSelection ?? {};
196+ check('BioLock enrolment asks for the built-in reader only', sel.authenticatorAttachment === 'platform' && sel.userVerification === 'required' && sel.residentKey === 'required' && regOpts.options.hints?.[0] === 'client-device' && !!regOpts.challengeId, JSON.stringify(regOpts).slice(0, 300));
197+ const signOpts = await (await anon.req('/api/biolock/signin/options', { method: 'POST', json: { ids: [] } })).json();
198+ check('BioLock sign-in requires user verification', signOpts?.options?.userVerification === 'required' && !!signOpts.challengeId);
199+ check('BioLock add needs a session', (await anon.req('/api/biolock/register/options', { method: 'POST', json: { mode: 'add' } })).status === 401);
200+ check('a bad BioLock link is refused', [400, 410].includes((await anon.req('/api/biolock/register/options', { method: 'POST', json: { mode: 'link', token: 'x'.repeat(32) } })).status));
201+ const forged = await anon.req('/api/biolock/signin/verify', { method: 'POST', json: { challengeId: signOpts.challengeId, response: { id: 'AAAAAAAAAAAAAAAAAAAAAA', type: 'public-key', response: {} } } });
202+ check('BioLock refuses an unknown device', forged.status === 401, String(forged.status));
203+ check('a BioLock challenge works once', (await anon.req('/api/biolock/signin/verify', { method: 'POST', json: { challengeId: signOpts.challengeId, response: { id: 'AAAAAAAAAAAAAAAAAAAAAA' } } })).status === 400);
204+ const settingsHtml = await (await a.req('/settings')).text();
205+ check('settings lists BioLock devices and offers to add one', settingsHtml.includes('id="biolock"') && settingsHtml.includes('data-biolock-register="add"') && !/Link GitHub|Link Google/.test(settingsHtml));
206+ const linkPage = await a.req('/settings/biolock/link', { method: 'POST', form: {} });
207+ const linkHtml = await linkPage.text();
208+ const linkToken = linkHtml.match(/\/biolock\/add#([A-Za-z0-9_-]+)/)?.[1];
209+ check('settings makes a one-time BioLock link', linkPage.status === 200 && !!linkToken);
210+ const linkOpts = await (await anon.req('/api/biolock/register/options', { method: 'POST', json: { mode: 'link', token: linkToken } })).json();
211+ check('a BioLock link opens enrolment for its account', linkOpts?.options?.authenticatorSelection?.authenticatorAttachment === 'platform' && !!linkOpts.challengeId);
212+ const privacyHtml = await (await anon.req('/privacy')).text();
213+ check('privacy page names no outside sign-in providers', privacyHtml.includes('BioLock') && !/github|google/i.test(privacyHtml.replace(/<script[\s\S]*?<\/script>/g, '').replace(/googletagmanager/g, '')));
214+
190215 const home = await anon.req('/');
191216 check('security headers on pages', (home.headers.get('content-security-policy') ?? '').includes("frame-ancestors 'none'") && home.headers.get('x-content-type-options') === 'nosniff');
192217 check('404 page', (await anon.req('/nope')).status === 404);
⋯
467492 check('visitors cannot add a pick', [403, 404].includes((await anon.req('/admin/picks', { method: 'POST', form: pickForm })).status));
468493 check('members cannot add a pick', (await a.req('/admin/picks', { method: 'POST', form: pickForm })).status === 404);
469494 check('a pick must credit a maker', (await admin.req('/admin/picks', { method: 'POST', form: { ...pickForm, maker: '' } })).status === 400);
495+ check('a pick refuses outside brand names on its card', (await admin.req('/admin/picks', { method: 'POST', form: { ...pickForm, title: 'Cloudflare Thing' } })).status === 400 && (await admin.req('/admin/picks', { method: 'POST', form: { ...pickForm, maker: 'OpenAI' } })).status === 400);
470496 const addPick = await admin.req('/admin/picks', { method: 'POST', form: pickForm });
471497 check('admin adds a pick', addPick.status === 302 && addPick.headers.get('location') === '/admin?tab=picks', String(addPick.status));
472498 const pickPath = `/skills/sprout/pick-${run}`;
473499 const pickRes = await anon.req(pickPath);
474500 const pickHtml = await pickRes.text();
475- check('pick page credits the maker and names the repo without linking out', pickRes.status === 200 && pickHtml.includes('Example Maker') && pickHtml.includes(`example-org/pick-${run}`) && !pickHtml.includes('href="https://github.com/'));
501+ check('pick page credits the maker in plain words without linking out', pickRes.status === 200 && pickHtml.includes('Example Maker') && !pickHtml.includes('href="https://github.com/') && !/stars on /.test(pickHtml));
476502 check('pick page offers no download or replant', !pickHtml.includes(`${pickPath}/download`) && !pickHtml.includes('/share?replant='));
477503 check('a pick has nothing to download', (await anon.req(`${pickPath}/download`)).status === 404);
478504 check('a pick page has comments and a share button', pickHtml.includes('id="comments"') && pickHtml.includes('data-share-url="'));
⋯
510536 check('one repo does not fill the first page of picks', new Set(topRepos).size === topRepos.length && topRepos.length === 12, topRepos.join(' '));
511537 // Search by maker, repo, licence, member and several words; categories; install steps.
512538 const call = async (name, args) => toolData(await mcp('/mcp', 'tools/call', { name, arguments: args }));
513- const byMaker = await call('search_skills', { maker: 'openai', limit: 30 });
514- check('MCP search filters by maker', byMaker?.skills?.length >= 24 && byMaker.skills.every((k) => k.maker?.name === 'OpenAI'), `${byMaker?.skills?.length}`);
539+ const byMaker = await call('search_skills', { maker: 'an AI lab', limit: 30 });
540+ check('MCP search filters by maker', byMaker?.skills?.length >= 24 && byMaker.skills.every((k) => k.maker?.name === 'an AI lab'), `${byMaker?.skills?.length}`);
515541 const byRepo = await call('search_skills', { repo: 'anthropics/claude-for-legal', limit: 30 });
516542 check('MCP search filters by repo', byRepo?.skills?.length === 12 && byRepo.skills.every((k) => k.github?.repo === 'anthropics/claude-for-legal'), `${byRepo?.skills?.length}`);
517543 const byLicense = await call('search_skills', { license: 'mpl-2.0' });
⋯
549575 check('Gemini CLI installs into the shared agents folder', geminiPlan?.agents?.[0]?.folder === '~/.agents/skills');
550576 // Converted copies of picks.
551577 const copyPage = await (await anon.req('/skills/sprout/powerpoint-decks')).text();
552- check('a pick with a converted copy offers the multi-agent version', copyPage.includes('id="multi-agent"') && copyPage.includes('npx skills add https://branchwell.ai/skillfarm/skills.git --skill pptx --full-depth -a codex -g -y') && copyPage.includes('branchwell.ai/skillfarm/skills/blob/main/converted/pptx/NOTICE.md') && !copyPage.includes('github.com/projectatomai') && copyPage.includes('Install the original'));
578+ check('a pick with a converted copy offers the multi-agent version', copyPage.includes('id="multi-agent"') && copyPage.includes('npx skills add https://branchwell.ai/skillfarm/skills.git --skill pptx --full-depth -a codex -g -y') && !copyPage.includes('NOTICE.md') && !copyPage.includes('keeps the credit') && !copyPage.includes('github.com/projectatomai') && copyPage.includes('Install the original'));
553579 check('a pick without a converted copy shows no multi-agent card', !(await (await anon.req('/skills/sprout/security-best-practices')).text()).includes('id="multi-agent"'));
554580 const copyPlan = await call('install_skill', { skill: 'sprout/powerpoint-decks' });
555581 check('install steps use the maker\'s way for Claude Code and the converted copy elsewhere', copyPlan?.agents?.length === 3 && copyPlan.agents.find((k) => k.agent === 'claude-code')?.quick_where === 'claude-code' && copyPlan.agents.find((k) => k.agent === 'codex')?.copy === true && copyPlan.multi_agent?.agents?.length === 3 && copyPlan.multi_agent.repo === 'skillfarm/skills', JSON.stringify(copyPlan?.agents?.map((k) => [k.agent, k.quick_where, k.copy])));

wrangler.jsonc changed

2828 },
2929 "vars": {
3030 "SITE_URL": "https://skillfarm.ai",
31- "ADMIN_GITHUB_IDS": "1140777",
3231 "EMAIL_FROM": "Skillfarm <sprout@skillfarm.ai>",
3332 "AI_REVIEW_MODEL": "claude-opus-5-5"
3433 }
3534 // Secrets (set with `wrangler secret put NAME`):
3635 // SESSION_SECRET required, long random string
37- // GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET GitHub sign-in (also raises the star-lookup rate limit)
38- // GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET Google sign-in
3936 // ANTHROPIC_API_KEY AI review of submissions
4037 // RESEND_API_KEY email notices
4138 // VIRUSTOTAL_API_KEY optional hash lookup

wrangler.preview.jsonc changed

2727 },
2828 "vars": {
2929 "SITE_URL": "https://skillfarm.ai",
30- "ADMIN_GITHUB_IDS": "1140777",
3130 "EMAIL_FROM": "Skillfarm <sprout@skillfarm.ai>",
3231 "AI_REVIEW_MODEL": "claude-opus-5-5"
3332 }
3433 // Secrets (set with `wrangler secret put NAME`):
3534 // SESSION_SECRET required, long random string
36- // GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET GitHub sign-in (also raises the star-lookup rate limit)
37- // GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET Google sign-in
3835 // ANTHROPIC_API_KEY AI review of submissions
3936 // RESEND_API_KEY email notices
4037 // VIRUSTOTAL_API_KEY optional hash lookup

Browse files at this commit