pm-skills 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
1
+ # Python (helper scripts)
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .venv/
6
+ venv/
7
+
8
+ # OS / editor
9
+ .DS_Store
10
+ *.swp
11
+ .idea/
12
+ .vscode/
13
+
14
+ # Generated docs catalog (built in CI for Pages)
15
+ web/catalog.html
16
+ web/leaderboard.html
17
+ web/community.html
18
+ web/skill/
19
+ web/sitemap.xml
20
+ web/robots.txt
21
+
22
+ # vercel-labs `skills` CLI install artifacts (if run inside the repo)
23
+ .agents/
24
+ .claude/skills/
25
+ skills-lock.json
26
+
27
+ # Generated full eval set (regenerated by scripts/gen-eval-cases.mjs)
28
+ evals/cases.full.json
29
+
30
+ # Generated agent-discovery files (rebuilt on deploy)
31
+ web/llms.txt
32
+ web/llms-full.txt
33
+
34
+ # Python build artifacts
35
+ python/dist/
36
+ python/*.egg-info/
37
+ __pycache__/
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.4
2
+ Name: pm-skills
3
+ Version: 0.1.0
4
+ Summary: 205 professional Agent Skills (PRDs, launch plans, postmortems, rubrics, contracts…) as importable building blocks for Python AI agents — LangChain, CrewAI, LlamaIndex, or any framework.
5
+ Project-URL: Homepage, https://github.com/mohitagw15856/pm-claude-skills
6
+ Project-URL: Playground, https://mohitagw15856.github.io/pm-claude-skills/
7
+ Author: Mohit Aggarwal
8
+ License: MIT
9
+ Keywords: agent-skills,ai-agents,crewai,langchain,llm,mcp,prompts
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
13
+ Requires-Python: >=3.9
14
+ Provides-Extra: crewai
15
+ Requires-Dist: crewai>=0.40; extra == 'crewai'
16
+ Provides-Extra: langchain
17
+ Requires-Dist: langchain-core>=0.2; extra == 'langchain'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # pm-skills (Python)
21
+
22
+ **205 professional Agent Skills** — PRDs, launch plans, postmortems, rubrics, contracts, pitch
23
+ decks and more, across 21 professions — as importable building blocks for Python AI agents.
24
+ The skills are bundled with the package, so there's **no network call and no API key** to read them.
25
+
26
+ ```bash
27
+ pip install pm-skills # core
28
+ pip install "pm-skills[langchain]" # + LangChain tools
29
+ pip install "pm-skills[crewai]" # + CrewAI tools
30
+ ```
31
+
32
+ ## Core (no dependencies)
33
+
34
+ ```python
35
+ import pm_skills
36
+
37
+ pm_skills.search_skills("customer churn") # -> [skill dicts]
38
+ pm_skills.get_skill("prd-template")["description"] # -> "..."
39
+ pm_skills.bundles() # -> ['pm-creator', 'pm-engineering', ...]
40
+
41
+ # A ready-to-send prompt for any model:
42
+ prompt = pm_skills.skill_prompt("incident-postmortem", task="API outage, 42 min, bad deploy")
43
+ ```
44
+
45
+ ## As LangChain tools
46
+
47
+ ```python
48
+ from langchain.agents import create_react_agent
49
+ from pm_skills import as_langchain_tools
50
+
51
+ tools = as_langchain_tools() # [search_pm_skills, get_pm_skill]
52
+ # give `tools` to your agent — it can search the library and pull a skill's framework on demand
53
+ ```
54
+
55
+ ## As CrewAI tools
56
+
57
+ ```python
58
+ from crewai import Agent
59
+ from pm_skills import as_crewai_tools
60
+
61
+ analyst = Agent(role="Product Analyst", tools=as_crewai_tools(), goal="...", backstory="...")
62
+ ```
63
+
64
+ Any other framework works too — `skill_prompt(name, task)` returns plain text you can drop into
65
+ any LLM call. Same skills run live in the [browser playground](https://mohitagw15856.github.io/pm-claude-skills/),
66
+ over [MCP](https://github.com/mohitagw15856/pm-claude-skills/tree/main/mcp), or via `npx pm-claude-skills`.
@@ -0,0 +1,47 @@
1
+ # pm-skills (Python)
2
+
3
+ **205 professional Agent Skills** — PRDs, launch plans, postmortems, rubrics, contracts, pitch
4
+ decks and more, across 21 professions — as importable building blocks for Python AI agents.
5
+ The skills are bundled with the package, so there's **no network call and no API key** to read them.
6
+
7
+ ```bash
8
+ pip install pm-skills # core
9
+ pip install "pm-skills[langchain]" # + LangChain tools
10
+ pip install "pm-skills[crewai]" # + CrewAI tools
11
+ ```
12
+
13
+ ## Core (no dependencies)
14
+
15
+ ```python
16
+ import pm_skills
17
+
18
+ pm_skills.search_skills("customer churn") # -> [skill dicts]
19
+ pm_skills.get_skill("prd-template")["description"] # -> "..."
20
+ pm_skills.bundles() # -> ['pm-creator', 'pm-engineering', ...]
21
+
22
+ # A ready-to-send prompt for any model:
23
+ prompt = pm_skills.skill_prompt("incident-postmortem", task="API outage, 42 min, bad deploy")
24
+ ```
25
+
26
+ ## As LangChain tools
27
+
28
+ ```python
29
+ from langchain.agents import create_react_agent
30
+ from pm_skills import as_langchain_tools
31
+
32
+ tools = as_langchain_tools() # [search_pm_skills, get_pm_skill]
33
+ # give `tools` to your agent — it can search the library and pull a skill's framework on demand
34
+ ```
35
+
36
+ ## As CrewAI tools
37
+
38
+ ```python
39
+ from crewai import Agent
40
+ from pm_skills import as_crewai_tools
41
+
42
+ analyst = Agent(role="Product Analyst", tools=as_crewai_tools(), goal="...", backstory="...")
43
+ ```
44
+
45
+ Any other framework works too — `skill_prompt(name, task)` returns plain text you can drop into
46
+ any LLM call. Same skills run live in the [browser playground](https://mohitagw15856.github.io/pm-claude-skills/),
47
+ over [MCP](https://github.com/mohitagw15856/pm-claude-skills/tree/main/mcp), or via `npx pm-claude-skills`.
@@ -0,0 +1,109 @@
1
+ """pm_skills — 205 professional Agent Skills as importable building blocks for Python
2
+ AI agents (LangChain, CrewAI, LlamaIndex, or any framework).
3
+
4
+ Core helpers have no dependencies:
5
+
6
+ import pm_skills
7
+ pm_skills.search_skills("customer churn") # -> [skill dicts]
8
+ pm_skills.get_skill("prd-template") # -> skill dict
9
+ pm_skills.skill_prompt("prd-template", task="a referral feature") # -> ready prompt
10
+
11
+ Framework adapters lazy-import the framework (install the extra you need):
12
+
13
+ from pm_skills import as_langchain_tools, as_crewai_tools
14
+ """
15
+ from __future__ import annotations
16
+ import json
17
+ from functools import lru_cache
18
+ from importlib import resources
19
+
20
+ __all__ = [
21
+ "list_skills", "get_skill", "search_skills", "skill_prompt", "bundles",
22
+ "as_langchain_tools", "as_crewai_tools", "__version__",
23
+ ]
24
+ __version__ = "0.1.0"
25
+
26
+
27
+ @lru_cache(maxsize=1)
28
+ def _skills() -> list[dict]:
29
+ text = resources.files("pm_skills").joinpath("skills.json").read_text(encoding="utf-8")
30
+ return json.loads(text)["skills"]
31
+
32
+
33
+ def list_skills(bundle: str | None = None) -> list[dict]:
34
+ """All skills, optionally filtered to one bundle (e.g. 'pm-engineering')."""
35
+ return [s for s in _skills() if bundle is None or s.get("plugin") == bundle]
36
+
37
+
38
+ def bundles() -> list[str]:
39
+ return sorted({s.get("plugin", "other") for s in _skills()})
40
+
41
+
42
+ def get_skill(name: str) -> dict:
43
+ """A skill by exact name. Raises KeyError if not found."""
44
+ for s in _skills():
45
+ if s["name"] == name:
46
+ return s
47
+ raise KeyError(f"No skill named {name!r}. Try search_skills().")
48
+
49
+
50
+ def search_skills(query: str, limit: int = 10) -> list[dict]:
51
+ """Keyword search over title/description/name, best matches first."""
52
+ q = query.lower()
53
+ scored = [(s, (s["title"] + " " + s["description"] + " " + s["name"]).lower().count(q)) for s in _skills()]
54
+ return [s for s, n in sorted(scored, key=lambda x: -x[1]) if n > 0][:limit]
55
+
56
+
57
+ def skill_prompt(name: str, task: str = "") -> str:
58
+ """The skill's full instructions, ready to send to any model — optionally with a task."""
59
+ body = get_skill(name)["instructions"]
60
+ return body + (f"\n\n---\nApply this skill now to the following:\n{task}" if task else "")
61
+
62
+
63
+ # ---- framework adapters (lazy imports) -------------------------------------
64
+ def as_langchain_tools():
65
+ """Two LangChain tools: search_pm_skills(query) and get_pm_skill(name)."""
66
+ try:
67
+ from langchain_core.tools import tool
68
+ except ImportError as e: # pragma: no cover
69
+ raise ImportError("Install LangChain: pip install pm-skills[langchain]") from e
70
+
71
+ @tool
72
+ def search_pm_skills(query: str) -> str:
73
+ """Search 205 professional skills (PRDs, launches, postmortems, rubrics…) by keyword."""
74
+ hits = search_skills(query, limit=8)
75
+ return "\n".join(f"- {s['name']}: {s['description']}" for s in hits) or "No matches."
76
+
77
+ @tool
78
+ def get_pm_skill(name: str) -> str:
79
+ """Get a professional skill's full instructions by name, to apply to the current task."""
80
+ try:
81
+ return skill_prompt(name)
82
+ except KeyError as e:
83
+ return str(e)
84
+
85
+ return [search_pm_skills, get_pm_skill]
86
+
87
+
88
+ def as_crewai_tools():
89
+ """The same two tools as CrewAI BaseTools."""
90
+ try:
91
+ from crewai.tools import tool
92
+ except ImportError as e: # pragma: no cover
93
+ raise ImportError("Install CrewAI: pip install pm-skills[crewai]") from e
94
+
95
+ @tool("Search PM Skills")
96
+ def search_pm_skills(query: str) -> str:
97
+ """Search 205 professional skills by keyword; returns names + descriptions."""
98
+ hits = search_skills(query, limit=8)
99
+ return "\n".join(f"- {s['name']}: {s['description']}" for s in hits) or "No matches."
100
+
101
+ @tool("Get PM Skill")
102
+ def get_pm_skill(name: str) -> str:
103
+ """Get a professional skill's full instructions by name."""
104
+ try:
105
+ return skill_prompt(name)
106
+ except KeyError as e:
107
+ return str(e)
108
+
109
+ return [search_pm_skills, get_pm_skill]