MCPcopy Index your code
hub / github.com/Platane/snk

github.com/Platane/snk @v3.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.5 ↗ · + Follow
157 symbols 612 edges 77 files 0 documented · 0% 5 cross-repo links updated 2mo agov3.5.0 · 2026-04-25★ 5,9273 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

snk

GitHub Workflow Status GitHub release GitHub marketplace type definitions code style

Generates a snake game from a github user contributions graph

github contribution grid snake animation

Pull a github user's contribution graph. Make it a snake Game, generate a snake path where the cells get eaten in an orderly fashion.

Generate a gif or svg image. Colors can be customized.

Available as github action. It can automatically generate a new image each day. Which makes for great github profile readme

Usage

github action

- uses: Platane/snk@v3
  with:
    # github user name to read the contribution graph from (**required**)
    # using action context var `github.repository_owner` or specified user
    github_user_name: ${{ github.repository_owner }}

    # list of files to generate.
    # one file per line. Each output can be customized with options as query string.
    #
    #  supported options:
    #  - palette:           A preset of color, one of [github, github-dark, github-light]
    #  - color_snake:       Color of the snake
    #  - color_dots:        Coma separated list of dots color.
    #                       The first one is 0 contribution, then it goes from the low contribution to the highest.
    #                       Exactly 5 colors are expected.
    #  - color_background:  Color of the background (for gif only)
    outputs: |
      dist/github-snake.svg
      dist/github-snake-dark.svg?palette=github-dark
      dist/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9&color_background=#aaaaaa

example with cron job

svg

If you are only interested in generating a svg (not a gif), consider using this faster action: uses: Platane/snk/svg-only@v3

dark mode

dark mode

For dark mode support on github, use this special syntax in your readme.










  <img alt="github-snake" src="https://github.com/Platane/snk/raw/v3.5/github-snake.svg" />



interactive demo

platane.github.io/snk

local

npm install

npm run dev:demo

Implementation

solver algorithm

Contribution Policy

This project does not accept pull request.

Reporting or fixing issues is appreciated, but change in the API or implementation should be discussed in issue first and is likely not going be greenlighted.

Core symbols most depended-on inside this repo

Shape

Function 157

Languages

TypeScript100%

Modules by API surface

packages/types/grid.ts12 symbols
packages/demo/interactive/index.ts10 symbols
packages/types/snake.ts9 symbols
packages/gif-creator/__tests__/createGif-variant.ts8 symbols
packages/solver/clearResidualColoredLayer.ts7 symbols
packages/solver/clearCleanColoredLayer.ts7 symbols
packages/svg-creator/index.ts6 symbols
packages/solver/tunnel.ts5 symbols
packages/solver/getBestTunnel.ts5 symbols
packages/demo/utils/canvas.ts5 symbols
packages/demo/interactive/springUtils.ts5 symbols
packages/svg-creator/snake.ts4 symbols

Dependencies from manifests, versioned

@actions/core1.11.1 · 1×
@cloudflare/workers-types4.20251119.0 · 1×
@snk/action1.0.0 · 1×
@snk/draw1.0.0 · 1×
@snk/forgejo-user-contribution1.0.0 · 1×
@snk/gif-creator1.0.0 · 1×
@snk/github-user-contribution1.0.0 · 1×
@snk/gitlab-user-contribution1.0.0 · 1×
@snk/solver1.0.0 · 1×
@snk/svg-creator1.0.0 · 1×
@snk/types1.0.0 · 1×
@types/bun1.3.4 · 1×

For agents

$ claude mcp add snk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page