Skip to content
Back to skills

Origin Url

ASecurity

Prints a git repository's origin URL, or writes a docs profile's recorded origins over, with every credential in it stripped by workflows-core's one redaction rule, for a command or skill in another plugin.

  • 2 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 30, 2026
developmentpythonbashgit

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add ihudak/ai-workflows --skill origin-url --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Origin Url?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Origin Url
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ihudak-origin-url/badge)](https://www.skillsdirectory.com/skills/ihudak-origin-url)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: origin-url
description: Prints a git repository's origin URL, or writes a docs profile's recorded origins over, with every credential in it stripped by workflows-core's one redaction rule, for a command or skill in another plugin.
user-invocable: false
allowed-tools: Bash
---

# origin-url — a repository's origin URL, with no credential in it

The argument is one repository's absolute path, or `--profile` and a docs profile's absolute path. A command or skill in another plugin that records or prints a repository's `origin` URL takes it from this skill, never from `git remote get-url origin` directly, and one that reads a docs profile has this skill redact the profile first: that URL can carry a credential — a token in its user part, or one a `url.<base>.insteadOf` setting injects, which `get-url` prints expanded — and the rule that strips it is `scripts/specs-git.py`'s `redact-url`, which the caller's own `${CLAUDE_PLUGIN_ROOT}` cannot name, since it names the caller's own plugin. This text is what your run executes: it reads nothing more.

## The call

Make one Bash call, `<path>` single-quoted, each `'` it holds written `'\''`:

```bash
git -c safe.bareRepository=explicit -C '<path>' remote get-url origin 2>/dev/null | python3 "${CLAUDE_PLUGIN_ROOT}/scripts/specs-git.py" redact-url || printf 'unknown\n'
```

`redact-url` strips everything after a `<scheme>://` URL's `://` through the last `@` it holds, keeps an `ssh://` URL's plain login name where that is its one `@` and an scp-like `<user>@<host>:<path>`'s user where that is a plain login name, each an SSH login name, keeps a path, and prints `none` where `get-url` printed nothing. It is the rule every value of origin's URL this family prints whole, writes, records or commits takes (`workflows-core:session-hygiene` §7), so what this call prints compares equal to what `workflows-core`'s own references print of the same origin.

## What it prints

- **A URL** — the repository's `origin`, redacted. Record it, or print it, as it stands.
- **`none`** — the repository has no `origin`, or git cannot read the path as one. Record no origin, as for a clone without one.
- **`unknown`** — the helper could not run, or refused a URL holding a line break, so the origin could not be read. Record what your command or skill records where this skill cannot run — never `git remote get-url origin`'s output, which can carry the credential.

## A docs profile: `--profile <file>`

With the arguments `--profile` and a docs profile's absolute path, make one Bash call instead, `<file>` single-quoted, each `'` it holds written `'\''`:

```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/specs-git.py" redact-url --profile-file '<file>'
```

It writes every `origin` the profile records — a `source_repos[]` entry's, as a block value, quoted or not, or in a flow mapping — over in the form the call above prints, wherever the two differ, every other byte of the file kept, and never prints a recorded value. It prints nothing where there was nothing to write over, or `workflows-core:session-hygiene` §6's credential line, naming the profile, where there was: print that line as it stands. **Where it exits non-zero** — the profile could not be read or written, or a line naming `origin` still holds a user part it does not rewrite, its line saying "could not be redacted" — print its one line, and do as your command or skill says of a profile that is not redacted; never read the profile then.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.