amanpal3/Dr-SKILLs / .agent/skills/archify
archify
UnverifiedCreate validated architecture, workflow, sequence, data-flow, lifecycle/state, ERD, class, tree, timeline, and waterfall diagrams as explorable standalone HTML with dark/light themes, motion and image/SVG/WebM export. Accept requirements or Mermaid; inspect repository evidence for code-backed diagrams. Use when visualizing systems, API calls, pipelines, schemas, histories, timings, or everyday steps, parts, relationships and states. Also turn an answer into a one-page explainer, with the conclusion first, structured panels, native diagrams and charts, when the user asks for a page, an explainer or an answer to share (做成一页, 用页面讲), or proactively when the user's rules opt in with an [archify explainer: ...] line. Not for dashboards.
renderers/shared/repository-location.mjs
View on GitHub// Repository identity and forge links are independent of local Git object checks.
// This module never contacts a remote server or reads the user's SSH config.
// Public forge hosts select their provider automatically. GitLab is also
// self-hosted, so an explicit `provider: "gitlab"` hint selects it on any host.
const PROVIDER_HOSTS = { 'github.com': 'github', 'gitee.com': 'gitee', 'gitlab.com': 'gitlab' };
export function parseRepositoryRemote(value, { authored = false, provider: providerHint } = {}) {
if (typeof value !== 'string') return null;
const raw = authored ? value : value.trim();
if (!raw || /[\s\\\u0000-\u001f\u007f?#]/.test(raw)) return null;
const scp = raw.match(/^git@([^/:]+):(.+)$/);
const scpAbsolute = Boolean(scp && scp[2].startsWith('/'));
const expanded = scp ? `ssh://git@${scp[1]}/${scp[2].replace(/^\//, '')}` : raw;
const match = expanded.match(/^(https?|ssh):\/\/([^/]+)\/(.+)$/i);
if (!match) return null;
// Validate the original path before URL parsing can collapse dot segments.
let segments;
try {
segments = match[3].replace(/\/$/, '').split('/');
// Git passes SCP paths literally; percent escapes are decoded only in URIs.
if (!scp) segments = segments.map(decodeURIComponent);
}
catch { return null; }
if (segments.some((part) => !part || part === '.' || part === '..' || /[/\\\s\u0000-\u001f\u007f?#]/.test(part))) return null;
let url;
try { url = new URL(expanded); } catch { return null; }
const protocol = url.protocol;
if (protocol === 'ssh:' && (url.username !== 'git' || url.password)) return null;
if (authored && protocol !== 'ssh:' && (url.username || url.password)) return null;
const hostname = url.hostname.toLowerCase();
if (!hostname) return null;
const provider = Object.hasOwn(PROVIDER_HOSTS, hostname) ? PROVIDER_HOSTS[hostname] : providerHint === 'gitlab' ? 'gitlab' : null;
const last = segments.length - 1;
if (provider) segments[last] = segments[last].replace(provider === 'github' ? /\.git$/i : /\.git$/, '');
if (!segments[last] || segments[last] === '.' || segments[last] === '..') return null;
const repositoryPath = segments.join('/');
// Only known forges map HTTPS and SSH to one repository namespace. Other
// hosts retain transport, port and remote-relative/absolute path semantics.
const port = url.port || (protocol === 'ssh:' ? '22' : protocol === 'https:' ? '443' : '80');
const endpoint = provider && ((protocol === 'https:' && port === '443') || (protocol === 'ssh:' && port === '22'))
? 'standard' : `${protocol}${port}`;
const pathKind = provider ? 'repository' : scp && !scpAbsolute ? 'relative' : 'absolute';
// path-contract-allow: url-path -- GitHub and GitLab repository paths are case-insensitive URL identities.
const identityPath = provider === 'github' || provider === 'gitlab' ? repositoryPath.toLowerCase() : repositoryPath;
const encodedPath = segments.map(encodeURIComponent).join('/');
const canonicalUrl = scp ? `git@${hostname}:${scpAbsolute ? '/' : ''}${repositoryPath}`
: `${protocol}//${protocol === 'ssh:' ? 'git@' : ''}${url.host}/${encodedPath}`;
return { identity: JSON.stringify([hostname, endpoint, pathKind, identityPath]), url: canonicalUrl, provider, protocol, path: repositoryPath, endpoint };
}
export function redactRepositoryRemote(value) {
return String(value || '')
.replace(/^((?:https?|ssh):\/\/)[^/]*@/i, '$1REDACTED@')
.replace(/[?#].*$/s, '?REDACTED');
}
export function repositorySourceHref(provider, url, revision, source) {
const encodedPath = source.path.split('/').map(encodeURIComponent).join('/');
const end = source.endLine && source.endLine !== source.line
? `-${provider === 'github' ? 'L' : ''}${source.endLine}` : '';
const fragment = source.line ? `#L${source.line}${end}` : '';
if (provider !== 'gitlab') return `${url}/blob/${revision}/${encodedPath}${fragment}`;
// GitLab renders Markdown blobs, where line anchors select nothing; the
// plain view keeps the cited lines highlighted.
const plain = source.line && /\.(?:md|markdown)$/i.test(source.path) ? '?plain=1' : '';
return `${url}/-/blob/${revision}/${encodedPath}${plain}${fragment}`;
}
export function repositoryTreeHref(provider, url, revision) {
return `${url}/${provider === 'gitlab' ? '-/' : ''}tree/${revision}`;
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |