Skip to content

Commit 58502e2

Browse files
committed
Synced ai-personas from https://github.com/KudoAI/ai-personas
1 parent d85af48 commit 58502e2

File tree

22 files changed

+5568
-1
lines changed

22 files changed

+5568
-1
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ updates:
99
- package-ecosystem: pip
1010
directories:
1111
- /
12+
- /ai-personas
1213
- /computer-languages
1314
- /data-languages
1415
- /find-project-root
9.18 KB
Loading

ai-personas/docs/README.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<a id="top"></a>
2+
3+
# > ai-personas
4+
5+
<a href="https://github.com/KudoAI/ai-personas/releases/tag/python-v1.0.0">
6+
<img height=31 src="https://img.shields.io/badge/Latest_Build-1.0.1-32fcee.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
7+
<a href="https://github.com/KudoAI/ai-personas/blob/main/python/docs/licenses/LICENSE-CODE.md">
8+
<img height=31 src="https://img.shields.io/badge/License-MIT-f99b27.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
9+
<a href="https://www.codefactor.io/repository/github/KudoAI/ai-personas">
10+
<img height=31 src="https://img.shields.io/codefactor/grade/github/KudoAI/ai-personas?label=Code+Quality&logo=codefactor&logoColor=white&labelColor=464646&color=a0fc55&style=for-the-badge"></a>
11+
<a href="https://sonarcloud.io/component_measures?metric=vulnerabilities&selected=KudoAI_ai-personas%3Apython&id=KudoAI_ai-personas">
12+
<img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3DKudoAI_ai-personas%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonar&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
13+
14+
> ### _1,000+ AI personas for LLMs and agents._
15+
16+
It's just a [JSON file](https://cdn.jsdelivr.net/gh/KudoAI/ai-personas@python-v1.0.0/data/ai-personas.json), so you can use it in any environment.
17+
18+
## Installation
19+
20+
```bash
21+
pip install ai-personas
22+
```
23+
24+
## Usage
25+
26+
```py
27+
import ai_personas
28+
29+
print(ai_personas['Linux Terminal']['prompt'])
30+
# => I want you to act as a linux terminal. I will type commands and you will...
31+
```
32+
33+
_Note: Most type checkers will falsely warn_ `ai_personas` _is not subscriptable because they are incapable of analyzing runtime behavior (where the module is replaced w/ a dictionary for cleaner, direct access). You can safely suppress such warnings using_ `# type: ignore`.
34+
35+
## Examples
36+
37+
Search by keyword:
38+
39+
```py
40+
keyword = 'coach'
41+
42+
for persona, data in ai_personas.items():
43+
if keyword.lower() in data['prompt'].lower():
44+
print(persona)
45+
# =>
46+
# ...
47+
# Interview Preparation Coach
48+
# Life Coach
49+
# Master Skills & Experience Summary Generator
50+
# Motivational Coach
51+
# Multilingual Writing Improvement Assistant
52+
# Pre-Interview Intelligence Dossier
53+
# ...
54+
```
55+
56+
Get 6 random personas:
57+
58+
```py
59+
import random
60+
61+
for persona in random.sample(list(ai_personas), 6):
62+
print(persona)
63+
64+
# e.g. =>
65+
# Internet Trend & Slang Intelligence
66+
# Tic-Tac-Toe Game
67+
# Reverse Prompt Engineer
68+
# Study planner
69+
# Develop a Media Center Plan for Hajj
70+
# China Business Law Assistant
71+
```
72+
73+
Get random prompt:
74+
75+
```py
76+
import random
77+
78+
rand_persona = random.choice(list(ai_personas.values()))
79+
print(rand_persona['prompt'])
80+
81+
# e.g. =>
82+
#
83+
# Act as a Node.js Automation Script Developer. You are an expert in creating
84+
# automated scripts using Node.js to streamline tasks such as file
85+
# manipulation, web scraping, and API interactions.
86+
#
87+
# Your task is to:
88+
# - Write efficient Node.js scripts to automate ${taskType}.
89+
# - Ensure the scripts are robust and handle errors gracefully.
90+
# - Use modern JavaScript syntax and best practices.
91+
#
92+
# Rules:
93+
# - Scripts should be modular and reusable.
94+
# - Include comments for clarity and maintainability.
95+
#
96+
# Example tasks:
97+
# - Automate file backups to a cloud service.
98+
# - Scrape data from a specified website and store it in JSON format.
99+
# - Create a RESTful API client for interacting with online services.
100+
#
101+
# Variables:
102+
# - ${taskType} - The type of task to automate (e.g., file handling, web
103+
# scraping).
104+
```
105+
106+
Fill variables in template prompts :
107+
108+
```py
109+
prompt = ai_personas['Node.js Automation Script Developer']['prompt']
110+
filled_prompt = prompt.replace('${taskType}', 'web scraping')
111+
112+
print(filled_prompt)
113+
114+
# =>
115+
# ...
116+
# Your task is to:
117+
# - Write efficient Node.js scripts to automate web scraping.
118+
# ...
119+
```
120+
121+
Combine prompts:
122+
123+
```py
124+
import ai_personas
125+
126+
mega_prompt = f'''
127+
When I start w/ sh: follow prompt A. When I start w/ dax: follow prompt B.
128+
129+
Prompt A: {ai_personas['Linux Terminal']['prompt']}
130+
131+
Prompt B: {ai_personas['DAX Terminal']['prompt']}
132+
'''
133+
134+
print(mega_prompt)
135+
136+
# =>
137+
#
138+
# When I start w/ sh: follow prompt A. When I start w/ dax: follow prompt B.
139+
#
140+
# Prompt A: I want you to act as a linux terminal...
141+
#
142+
# Prompt B: I want you to act as a DAX terminal...
143+
```
144+
145+
Build system prompt:
146+
147+
```py
148+
system_prompt = ai_personas['Study Planner']['prompt']
149+
150+
messages = [
151+
{'role': 'system', 'content': system_prompt},
152+
{'role': 'user', 'content': '<your_query>'}
153+
]
154+
```
155+
156+
## MIT License
157+
158+
Copyright © 2026 [KudoAI](https://www.kudoai.com) & contributors
159+
160+
#
161+
162+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/python-utils@760599e/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/python-utils@760599e/assets/images/icons/home/dark-gray/icon32x27.png"></picture> <a href=https://github.com/KudoAI/ai-personas/#readme>**More Python utilities**</a> /
163+
<a href="#top">Back to top ↑</a>

ai-personas/docs/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 🛡️ Security Policy
2+
3+
If you find a vulnerability, please e-mail security@tidelift.com and a fix will be coordinated within 2 business days.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# 🏛️ MIT License
2+
3+
**Copyright © 2026 [KudoAI](https://www.kudoai.com) & contributors**
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# 🏛️ Creative Commons Legal Code
2+
3+
### CC0 1.0 Universal
4+
5+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12+
HEREUNDER.
13+
14+
#### Statement of Purpose
15+
16+
The laws of most jurisdictions throughout the world automatically confer
17+
exclusive Copyright and Related Rights (defined below) upon the creator
18+
and subsequent owner(s) (each and all, an "owner") of an original work of
19+
authorship and/or a database (each, a "Work").
20+
21+
Certain owners wish to permanently relinquish those rights to a Work for
22+
the purpose of contributing to a commons of creative, cultural and
23+
scientific works ("Commons") that the public can reliably and without fear
24+
of later claims of infringement build upon, modify, incorporate in other
25+
works, reuse and redistribute as freely as possible in any form whatsoever
26+
and for any purposes, including without limitation commercial purposes.
27+
These owners may contribute to the Commons to promote the ideal of a free
28+
culture and the further production of creative, cultural and scientific
29+
works, or to gain reputation or greater distribution for their Work in
30+
part through the use and efforts of others.
31+
32+
For these and/or other purposes and motivations, and without any
33+
expectation of additional consideration or compensation, the person
34+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35+
is an owner of Copyright and Related Rights in the Work, voluntarily
36+
elects to apply CC0 to the Work and publicly distribute the Work under its
37+
terms, with knowledge of his or her Copyright and Related Rights in the
38+
Work and the meaning and intended legal effect of CC0 on those rights.
39+
40+
1. Copyright and Related Rights. A Work made available under CC0 may be
41+
protected by copyright and related or neighboring rights ("Copyright and
42+
Related Rights"). Copyright and Related Rights include, but are not
43+
limited to, the following:
44+
45+
i. the right to reproduce, adapt, distribute, perform, display,
46+
communicate, and translate a Work;
47+
ii. moral rights retained by the original author(s) and/or performer(s);
48+
iii. publicity and privacy rights pertaining to a person's image or
49+
likeness depicted in a Work;
50+
iv. rights protecting against unfair competition in regards to a Work,
51+
subject to the limitations in paragraph 4(a), below;
52+
v. rights protecting the extraction, dissemination, use and reuse of data
53+
in a Work;
54+
vi. database rights (such as those arising under Directive 96/9/EC of the
55+
European Parliament and of the Council of 11 March 1996 on the legal
56+
protection of databases, and under any national implementation
57+
thereof, including any amended or successor version of such
58+
directive); and
59+
vii. other similar, equivalent or corresponding rights throughout the
60+
world based on applicable law or treaty, and any national
61+
implementations thereof.
62+
63+
2. Waiver. To the greatest extent permitted by, but not in contravention
64+
of, applicable law, Affirmer hereby overtly, fully, permanently,
65+
irrevocably and unconditionally waives, abandons, and surrenders all of
66+
Affirmer's Copyright and Related Rights and associated claims and causes
67+
of action, whether now known or unknown (including existing as well as
68+
future claims and causes of action), in the Work (i) in all territories
69+
worldwide, (ii) for the maximum duration provided by applicable law or
70+
treaty (including future time extensions), (iii) in any current or future
71+
medium and for any number of copies, and (iv) for any purpose whatsoever,
72+
including without limitation commercial, advertising or promotional
73+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74+
member of the public at large and to the detriment of Affirmer's heirs and
75+
successors, fully intending that such Waiver shall not be subject to
76+
revocation, rescission, cancellation, termination, or any other legal or
77+
equitable action to disrupt the quiet enjoyment of the Work by the public
78+
as contemplated by Affirmer's express Statement of Purpose.
79+
80+
3. Public License Fallback. Should any part of the Waiver for any reason
81+
be judged legally invalid or ineffective under applicable law, then the
82+
Waiver shall be preserved to the maximum extent permitted taking into
83+
account Affirmer's express Statement of Purpose. In addition, to the
84+
extent the Waiver is so judged Affirmer hereby grants to each affected
85+
person a royalty-free, non transferable, non sublicensable, non exclusive,
86+
irrevocable and unconditional license to exercise Affirmer's Copyright and
87+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
88+
maximum duration provided by applicable law or treaty (including future
89+
time extensions), (iii) in any current or future medium and for any number
90+
of copies, and (iv) for any purpose whatsoever, including without
91+
limitation commercial, advertising or promotional purposes (the
92+
"License"). The License shall be deemed effective as of the date CC0 was
93+
applied by Affirmer to the Work. Should any part of the License for any
94+
reason be judged legally invalid or ineffective under applicable law, such
95+
partial invalidity or ineffectiveness shall not invalidate the remainder
96+
of the License, and in such case Affirmer hereby affirms that he or she
97+
will not (i) exercise any of his or her remaining Copyright and Related
98+
Rights in the Work or (ii) assert any associated claims and causes of
99+
action with respect to the Work, in either case contrary to Affirmer's
100+
express Statement of Purpose.
101+
102+
4. Limitations and Disclaimers.
103+
104+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
105+
surrendered, licensed or otherwise affected by this document.
106+
b. Affirmer offers the Work as-is and makes no representations or
107+
warranties of any kind concerning the Work, express, implied,
108+
statutory or otherwise, including without limitation warranties of
109+
title, merchantability, fitness for a particular purpose, non
110+
infringement, or the absence of latent or other defects, accuracy, or
111+
the present or absence of errors, whether or not discoverable, all to
112+
the greatest extent permissible under applicable law.
113+
c. Affirmer disclaims responsibility for clearing rights of other persons
114+
that may apply to the Work or any use thereof, including without
115+
limitation any person's Copyright and Related Rights in the Work.
116+
Further, Affirmer disclaims responsibility for obtaining any necessary
117+
consents, permissions or other rights required for any use of the
118+
Work.
119+
d. Affirmer understands and acknowledges that Creative Commons is not a
120+
party to this document and has no duty or obligation with respect to
121+
this CC0 or use of the Work.

ai-personas/noxfile.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import sys
2+
3+
import nox
4+
5+
py_cmd = 'py' if sys.platform.startswith('win') else 'python3'
6+
7+
def session(func) : return nox.session(venv_backend='none', name=func.__name__.replace('_', '-'))(func)
8+
9+
@session
10+
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name}, json ; print(json.dumps({mod_name}))'
20+
)
21+
clean(session, '--py2')
22+
23+
@session
24+
def lint(session): # staged project files
25+
files = session.run('git', 'diff', '--cached', '--name-only', '--relative', silent=True, log=False).splitlines()
26+
if files : session.run('pre-commit', 'run', '--files', *files, *session.posargs)
27+
@session
28+
def lint_all(session): # all project files
29+
files = session.run('git', 'ls-files', '.', silent=True, log=False).splitlines()
30+
session.run('pre-commit', 'run', '--files', *files, *session.posargs)
31+
32+
bump_cmd_args = (py_cmd, '-m', 'utils.bump')
33+
@session
34+
def bump_patch(session, no_push=True):
35+
cmd_args = bump_cmd_args + ('--patch',)
36+
if no_push : cmd_args += ('--no-push',)
37+
session.run(*cmd_args, *session.posargs)
38+
@session
39+
def bump_minor(session, no_push=True):
40+
cmd_args = bump_cmd_args + ('--minor',)
41+
if no_push : cmd_args += ('--no-push',)
42+
session.run(*cmd_args, *session.posargs)
43+
@session
44+
def bump_feat(session, no_push=True):
45+
bump_minor(session, no_push)
46+
@session
47+
def bump_major(session, no_push=True):
48+
cmd_args = bump_cmd_args + ('--major',)
49+
if no_push : cmd_args += ('--no-push',)
50+
session.run(*cmd_args, *session.posargs)
51+
52+
@session
53+
def build(session) : clean(session) ; session.run(py_cmd, '-m', 'build') ; print('Build complete!')
54+
@session
55+
def publish(session) : session.run('bash', 'utils/publish.sh', *session.posargs)
56+
57+
@session
58+
def deploy_patch(session) : bump_patch(session, no_push=False) ; build(session) ; publish(session)
59+
@session
60+
def deploy_minor(session) : bump_minor(session, no_push=False) ; build(session) ; publish(session)
61+
@session
62+
def deploy_feat(session) : deploy_minor(session)
63+
@session
64+
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
65+
66+
@session
67+
def clean(session, *args) : session.run(py_cmd, '-m', 'utils.clean', *args)

0 commit comments

Comments
 (0)