lov-project-port SKILL.md skillA
lov-project-port from lovstudio/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add lovstudio/skills/lov-project-port@v0.2.1Pins v0.2.1 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- lovstudio/skills
- Path
skills/project-port/SKILL.md- Versions recorded
- 6
- Latest version
- v0.2.1, committed Sep 25, 2026
- First version recorded
- Aug 10, 2026
- Size
- 3,365 bytes
- Repository stars
- 72
- License
- MIT
Generate a stable unique dev port (3000-8999) from a project name and help update project config. Use when the user needs to set a project port, start a dev server, resolve port conflicts, initialize a new project, or mentions "端口", "port", "dev server", "端口冲突", "project port".
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 端口管家 · Port Keeper
为项目生成稳定唯一的端口号(范围 3000-8999),同一项目名永远返回相同端口。
## 端口生成算法
```python
def generate_port(project_name: str) -> int:
hash_value = sum(ord(c) * (i + 1) for i, c in enumerate(project_name))
return 3000 + (hash_value % 6000)
```
## 使用场景
### 1. 查询项目端口
用户询问端口时,直接计算并告知:
```
项目 "skill-publisher" 的端口号是:7965
```
### 2. 更新项目配置
检测并更新项目中的端口配置文件:
| 文件 | 配置方式 |
|------|----------|
| `.env` / `.env.local` | `PORT=<port>` |
| `package.json` | scripts 中的 `--port <port>` |
| `vite.config.ts` | `server.port: <port>` |
| `next.config.js` | 通常使用 .env |
更新时优先使用 `.env` 方式,最小侵入性。
### 3. 启动开发服务器
```bash
PORT=$(scripts/hashport.sh) pnpm dev
```
## 脚本
运行 `scripts/hashport.sh [project-name]` 生成端口:
```bash
# 使用当前目录名
./scripts/hashport.sh
# 输出: 7965
# 指定项目名
./scripts/hashport.sh my-project
# 输出: 5123
```
## 端口冲突处理
若端口被占用:
1. 提示用户哪个进程占用了端口
2. 建议使用 `lsof -i :<port>` 查看
3. 可追加后缀生成备用端口:`generate_port("project-dev")`
## Runtime context (shared)
运行前读取本 Skill 包的 `skill.yaml`,由宿主提供 `skill-runtime/v1` 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
- 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
…Read the whole file at its exact version.
How to install
mdr add lovstudio/skills/lov-project-port@sha256:5d38397a95de7466The line at the top of this page pins the label v0.2.1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_etwlh7fi5getonbj)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 6 versions of this file, between Aug 10, 2026 and Sep 25, 2026, about one every 9 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v0.2.1 latest | 2026-09-25 | 4b67fd1 | 3,365 B | A | view · diff |
| v0.2.0 | 2026-09-07 | a09848e | 3,365 B | A | view · diff |
| v0.2.0 | 2026-08-23 | 00fafa8 | 3,360 B | A | view · diff |
| v0.1.1 | 2026-08-10 | d704a55 | 2,638 B | A | view · diff |
| v0.1.1 | 2026-08-10 | 22e49cf | 2,005 B | A | view · diff |
| v0.1.1 | 2026-08-10 | 08d33b8 | 2,005 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3365 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
lovstudio/skills · 72 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_etwlh7fi5getonbj GET https://markdownregistry.com/api/v1/resolve?ref=lovstudio/skills/lov-project-port GET https://markdownregistry.com/api/v1/blob/5d38397a95de74661e41075e995b1c8847656603acb40ccc81d00efd7eabd931
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.