Steps you should take:
1. Load all entities of a module (see example code here )
2. Find a specific entity (most classes support variable.model and from model you can call findEntityByQualifiedName(), see here )
3. Create additional Attributes using this function
4. Set properties of the new Attribute
5. Commit (see sample code here )
If you run into specific problems, post you code and I'll try to help you.