agentleFS
Seeed-ProjectsSeeed-Projects/Seeed-Jetson-DevelopTool/skills/claude/jetson-pc-wired-share/CLAUDE.md

Seeed-Jetson-DevelopTool / jetson-pc-wired-share

CLAUDE.md57 starsChanged 4 months agoMITView on GitHub

Temporarily share a Linux PC's internet connection to a Jetson over Ethernet using NetworkManager while preserving an existing static-IP SSH link. Use when the user asks to let a directly connected Jetson access the internet through the PC, or to start, verify, or stop that temporary sharing.

The file

We split this CLAUDE.md into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a separate, non-autoconnecting NetworkManager profile on the PC.

    line 8
  2. Distinctive:

    If the Jetson already has a static address and SSH uses the wired subnet, preserve the PC's existing address and subnet.

    line 23
  3. Very specific:

    Create or update a profile named jetson-wired-share on the downstream interface.

    line 29
  4. Very specific:

    If that profile already exists, use nmcli connection modify instead of creating a duplicate.

    line 42
  5. Very specific:

    If split DNS (commonly Tailscale) still captures public lookups, also use resolvectl domain <interface> '~.' so the wired link routes …

    line 54
  6. Distinctive:

    Verify from the Jetson, in order:

    line 58
  7. Very specific:

    Remove only the runtime Jetson route added by this workflow, deactivate jetson-wired-share, and reactivate the original wired profile …

    line 74
  8. Distinctive:

    Delete it only when the user asks.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Jetson PC wired internet sharing

Use a separate, non-autoconnecting NetworkManager profile on the PC. Keep the original wired profile intact so the operation is easy to reverse. Never put a sudo or SSH password in this skill, a connection profile, a script, or a log.

Start sharing

  1. Inspect before changing anything:

    • nmcli device status, active connections, ip -br addr, and ip route.
    • ip route get <jetson-ip> to identify the PC interface carrying SSH.
    • The Jetson's interface, address, routes, and DNS over the existing SSH link.
    • Confirm the PC has a working upstream/default route on a different interface.
  2. Determine the downstream PC address:

    • If the Jetson already has a static address and SSH uses the wired subnet, preserve the PC's existing address and subnet. This avoids losing SSH.
    • Otherwise choose an unused RFC1918 /24 that does not overlap any PC or Jetson route; NetworkManager's usual 10.42.0.1/24 is acceptable only after checking for conflicts.
  3. Create or update a profile named jetson-wired-share on the downstream interface. Set connection.autoconnect no, ipv4.method shared, the chosen ipv4.addresses, ipv4.never-default yes, and ipv6.method disabled. Then activate it. Do not edit or delete the original wired profile. Example shape:

    sudo nmcli connection add type ethernet \
      ifname <pc-wired-interface> con-name jetson-wired-share autoconnect no \
      ipv4.method shared ipv4.addresses <pc-address/cidr> \
      ipv4.never-default yes ipv6.method disabled
    sudo nmcli connection up jetson-wired-share

    If that profile already exists, use nmcli connection modify instead of creating a duplicate. Warn that activation may briefly flap the wired link.

  4. Configure the Jetson without making its static profile persistent unless the user explicitly asks. For an already-static Jetson, add a runtime route:

    sudo ip route replace default via <pc-wired-ip> dev <jetson-interface> metric 100

    Retain any unrelated routes. If DNS is not already usable, set runtime DNS on that interface with resolvectl dns <interface> <pc-wired-ip> when available. If split DNS (commonly Tailscale) still captures public lookups, also use resolvectl domain <interface> '~.' so the wired link routes ordinary DNS. For a DHCP-configured Jetson, renew DHCP instead.

  5. Verify from the Jetson, in order:

    • ping the PC's downstream address;
    • ping a public IP;
    • resolve a public hostname;
    • make a short HTTPS request.

    Report the active profile, PC/Jetson addresses, route, and observed test results. Do not claim success based only on a NetworkManager status message.

NetworkManager ipv4.method shared owns DHCP/DNS forwarding and NAT. If it does not work, inspect NetworkManager logs, IP forwarding, and nftables before making additional changes. Do not disable the host firewall wholesale.

Stop sharing

Remove only the runtime Jetson route added by this workflow, deactivate jetson-wired-share, and reactivate the original wired profile discovered at the start:

sudo ip route del default via <pc-wired-ip> dev <jetson-interface> metric 100
sudo resolvectl revert <jetson-interface>
sudo nmcli connection down jetson-wired-share
sudo nmcli connection up <original-wired-profile>

The share profile may remain saved for reuse because it has autoconnect disabled. Delete it only when the user asks. Recheck the original PC-to-Jetson SSH route after restoration.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.